On Tue, Aug 16, 2005 at 08:33:20AM +0100 or so it is rumoured hereabouts,
Colm Buckley thought:
> On 16 Aug 2005, at 08:31, Colin O'Keeffe wrote:
>> >How can I sync two directorys,
> >there both on the same machine..
>> rsync -av /home/stuff /storage/backups
However, this won't delete files in /storage/backups that no longer exist
in /home/stuff. If you want that too, add the '--delete' switch.
My home backup consists of an rsync to a removable disk with multiple
versions kept by use of hard links. It goes like this:
# Create hard links to all files under /backup/current in /backup/1
cp -al /backup/current /backup/1
# Rsync desired filesystem to /backup/current
rsync -a --delete -v -x / /backup/current
Because rsync deletes a file that it is replacing, this results in the
total size of /backup/1 and /backup/current being the size of /backup/1
plus the size of the changes betweet /backup/1 and /backup/current . My
removable 250Gb disk currently holds 20 snapshots of my systems in the
space of about 2 in this manner.
Script for this task available on request...
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
08:27:05 up 1 day, 16:49, 1 user, load average: 0.00, 0.02, 0.00
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!