Offsite backup of "current" folder for each client

I am currently running an rsync backup to a remote machine through a network mountpoint using the following command every day

rsync -aXH --delete /media/backup/urbackup /media/backup/urbackup_backup/

Both the source and the destination are on network folders on different machines mounted locally as above.

This does seem to do the trick but takes a good 6 hours to complete. I thought it would be much quicker as there is only a couple hundred megabytes a day changing on the server. Not sure if I am using the right flags here?

So, I thought it might be better to just sync the “current” folder from each client inidvidually thinking this would check the current backup only so that the backups would be quicker.

However when I run the following on one of my clients

rsync -aXHv --delete --exclude ‘.hashes’ /media/backup/urbackup/(CLIENT FOLDER)/current/ /media/backup/urbackup_backup/(CLIENT FOLDER)

It gets through the rsync command successfully without any errors but says it has only transferred 400 odd megabytes of a backup I know to be 35GB.

All I want is the most recent backup to be synced across to my offsite machine in the building next store to us so that if I have an unrecoverable failure I can just seed the original server with the latest files from my client machines. It doesn’t need to have hardlinks or anything. Just the original folder structure would be perfect.

I hope someone can help me out here.

Thanks!

I think whats happening here is it is following the symlinks to the original mount point! I realised this when I ssh into the offsite machine it just has symlinks that it cant follow.

So how would I tell the original machine to follow all the symlinks and copy all the files across WITHOUT symlinks?

I have just run rsync -aXLv

adding the L and removing the H and it seems to be working. Will compare when it is finished and report back.

Hi there,

I am trying to accomplish the same task. btrfs 2 btrfs
I will try to synchronize two backup servers using this script. I hope this script to make my like easier.

1 Like