I need some help please I got two linux servers, one of then a ubuntu server What am doing is backing up files from the ubuntu server to this other server using rsync. I want to preserve file permissions and owners so i created the same users and groups on the other server. Now i rsync and use the option to preserve file permissions. After my rsync i see all the files have been given to root. What am i doing wrong? All i want is to preserve the users and rights when i rsync across. Any help will be great.
Try the options "-o" and "-g".
Originally Posted by nbkr Try the options "-o" and "-g". OK i re-read the manual and yes -o -g could be the solution. So far... looks good but will have to wait till sometime tomorrow as am backing up a 3TB server. Scary..... Thanks dude
the -a option is somewhat analagous to cp's -a option and will also do what you want. check rsync's man page for more information.
Te audire no possum. Musa sapientum fixa est in aure.
here is a good guide https://help.ubuntu.com/community/rsync
Mystic-Boa - RSS Feed Downloader (https://launchpad.net/mystic-boa) Linux Documentation (http://www.google.com/notebook/publi...zTSwoQtNGpob4i)
I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track.
Originally Posted by brettg I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track. Really? How so? A copy of yer data is a copy of yer data, right? Sidenote: To use the -a switch (and preserve permissions), you need to run it with sudo or in a root cronjob.
Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide Tomorrow's an illusion and yesterday's a dream, today is a solution...
Originally Posted by CharlesA Really? How so? A copy of yer data is a copy of yer data, right? I think the idea is that rsync can protect you from hardware failure, since you can restore to your most recent rsync, however if you delete a file and run rsync you still don't have a backup of the file. With a "proper" backup solution you could restore the file from last week, two weeks ago, a month ago etc etc depending on your backup schedule/scheme. Look at rdiff-backup for a backup solution that uses rsync's principals of only working on what has changed. I've not used it much but it seems easy to use and well liked in the community.
Originally Posted by Plecebo I think the idea is that rsync can protect you from hardware failure, since you can restore to your most recent rsync, however if you delete a file and run rsync you still don't have a backup of the file. With a "proper" backup solution you could restore the file from last week, two weeks ago, a month ago etc etc depending on your backup schedule/scheme. Look at rdiff-backup for a backup solution that uses rsync's principals of only working on what has changed. I've not used it much but it seems easy to use and well liked in the community. That makes sense. I do daily backups using cp -al and rsync, that way I have backups of files that are changed/deleted, in case I need to go back to a previous version.
Originally Posted by brettg I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track. I can boot an rsync'ed root partition in a VM in minutes. What exactly is horrible about that? rsync over to a new directory every time and have fslint dedup with hard links. throw in a copy of sfdisk's output and you have what you need to put it back down. (BackupPC would work better though)
Ubuntu Forums Code of Conduct