Author Topic: How to use a symlink folder for remote backups?  (Read 3456 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to use a symlink folder for remote backups?
« on: July 04, 2021, 09:54:51 AM »
Hi chaps!

I have 2x CWP servers running, one with a huge additional backup drive.
For now let's call the new server 'ONE' and the old server with the backup drive 'TWO'.
I'd like to make use of the remote backup functionality on ONE > TWO, configured and set up remote backups.

When testing the backup, ONE logs into TWO and creates a new folder.
New folder location on TWO is /home/backupusersg/cwp_remote/
Backup works perfectly, tested and verified.

BUT, /home/ is not the backup drive.. I need to move this folder elsewhere.
I have deleted the folder /home/backupusersg/cwp_remote/, navigated to the backup drive and created /backup/backupusersg/cwp_remote/.
All good so far..

Created a symlink, so the folder in the /backup/backupusersg/cwp_remote/ now appears in the /home/backupusersg/cwp_remote/ location:
Code: [Select]
# ln -s /backup/backupusersg/cwp_remote/ /home/backupusersg/
Symlink verified here:


Original folder that was symlinked, to show permissions:


Yet when running the backup (which worked when the remote folder was not a symlink) I get:
Code: [Select]
mkdir: cannot create directory ‘cwp_remote’: Permission denied
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]


Any suggestions? I haven't configured the CWP remote backups before, advice greatly appreciated!
« Last Edit: July 04, 2021, 10:48:22 AM by FreshLondon »

Offline
*
Re: How to use a symlink folder for remote backups?
« Reply #1 on: July 05, 2021, 04:41:34 AM »
I tried both the above mentioned, and moving the entire user folder location (using the proper command for moving users) but then SSH was playing up.
I no longer need this solution, although if anyone has the answer I'm sure someone finding this thread on a Google search would benefit.

My solution, I created a tiny Amazon instance. Removed the backup drive from my server and mounted it to this instance.
Moved the /home directory to the backup drive, added a user for each server that needs to backup there (to split the backups innto nice folders so they don't overwrite each other).

Problem solved, works like a dream!  :)