#1 (permalink)  
Old 02-04-2008, 01:05 PM
Registered User
 
Join Date: Jan 2007
Posts: 25
stormrider is on a distinguished road
Backup alternative: rsync + external server

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:

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
In this case, we will keep 4 backups.

After this, we run a rsync to b.0 folder ON the cpanel server:

Code:
rsync -avprz --delete -e ssh /home/ user@exampĺe.com:/home/user/b.0/
It works fine, saves a LOT of bandwidth and uses less resources than the default cpbackup on FTP.


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-05-2008, 10:18 PM
Registered User
 
Join Date: Apr 2004
Posts: 194
markhard
have you looked at the rsync help page?

rsync --help

last time i see it, it does have option to preserve the file permission, symlink, etc
__________________
HalfDedi.com : Half Dedicated Half Price
We Provide Affordable VPS hosting solution in US and Singapore
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:13 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc