rsync backup
don fisher
hdf3 at comcast.net
Sat Nov 21 21:19:30 UTC 2009
Karl F. Larsen wrote:
> don fisher wrote:
>> don fisher wrote:
>>> Karl Larsen wrote:
>>>> I have lost the little thing I used to call for a backup of
>>>> my linux. I was using rsync -avg / exempt/media exempt/dev .
>>>> .. /media/disk-1, or something like that.
>>>>
>>>> I have looked at man rsync which is confusing, and tried
>>>> Google but their info is trivial.
>>>>
>>>> Is anyone using something like this?
>>>>
>>>> Karl
>>>>
>>>>
>>>>
>>> I have the following in a a script that backs up the entire disk to a
>>> 500GB usb drive that I mount on /backup.
>
> Hi Don, this is almost exactly what I want to do.
>
>>> sudo nice --adjustment=10 rsync -rlpgouvtS --progress -v
>
> What does "sudo nice --adjustment=10" do? I have never tried
> sudo nice, ever.
>
>
>
>>> --delete --modify-window=1200
>
> What does "--progress -v << --delete --modify-window=1200" do?
>
>>> --exclude-from=/home/your_name/rsync-backup_exclude / /backup
>>>
>>> The rsync-backup_exclude fike looks like:
>>> /proc/*
>>> /sys/*
>>> /dev/*
>>> /lost+found/*
>>> /var/log/lastlog
>>> /swapfile
>>> /usr2/*
>>> /usr3/*
>>> /tmp/*
>>> /net/*
>>> /mnt/*
>>> /cdrom/*
>>>
>
> Why do most entries end with /* but a few just end?
>
>
>>> You probably don't have all of the same mount points that I do, so edit
>>> to taste.
>>>
>>> don
>> Sorry, but /backup is also in the rsync-backup_exclude file.
>
> I was going to say what happened to the possible endless loop?
>
>
> I will edit to taste and fool around. I did a pretty good
> backup with rdiff-backup which I think uses rsync, but there
> where a lot of errors listed.
>
>
> 73 Karl
>
>> don
>
>
Karl,
sudo is required to process the system files. This command preserves the
owner and group, and also the creation and modification times. Without
sudo you can't modify another persons file stats.
nice --adjustment=10 is really just nice, since the default level is 10.
It lowers the priority so that if I am trying to do something else I get
a few cycles.
--progress -v shows the percentage transfer of each file.
--delete deletes files that don't exist on the source. This command will
update an existing backup only transferring the changes and removing
files that no longer exist.
--delete --modify-window=1200 sets a window on the time stamp so it does
not try and delete files that are really the same. Not sure this is
still required.
Most of the -rlpgouvtS switches are explained below. I have this comment
at the top of my script just encase I forget:-)
# -r recursive - copy directories recursively
# -l copy symlinks as symlinks
# -p preserve permissions
# -t preserve times
# -g preserve group
# -o preserve owner (root only)
# -D preserve device and special files.
I am a not a good emailer, so if there are omissions please get back.
don
More information about the ubuntu-users
mailing list