Hello,
I'm trying to figure out how to backup my /home to an external server using rsync ( probably the best way to backup without overloading your server ).
How does it work?
The following script is ran on the external server:
In this case, we will keep 4 backups.Code:mv b.3 b.tmp mv b.2 b.3 mv b.1 b.2 mv b.0 b.1 mv b.tmp b.0 cp -al b.1/. b.0
After this, we run a rsync to b.0 folder ON the cpanel server:
It works fine, saves a LOT of bandwidth and uses less resources than the default cpbackup on FTP.Code:rsync -avprz --delete -e ssh /home/ user@exampĺe.com:/home/user/b.0/
What's the problem?
My problem is when i need to restore a backup.
When i run rsync my permissions get messed up. They are all changed to the user on the external server.
Does anyone have an idea of how to solve this problem with permissions?
Thanks.



LinkBack URL
About LinkBacks
Reply With Quote




