On 16 Aug 2005, at 08:33, Colm Buckley wrote:
> On 16 Aug 2005, at 08:31, Colin O'Keeffe wrote:
>>> How can I sync two directorys,
>>>> /home/stuff
>>>> to
>>>> /storage/backups/stuff
>>>> there both on the same machine..
>> rsync -av /home/stuff /storage/backups
That MAY not be quite what Colin wanted. It will update
/storage/backups/stuff, putting in there any new files from /home/stuff
and updating any changed files, but it won't do anything about files
which have been deleted from /home/stuff - for those, you need to add
the --delete option.
And although the likelihood is that Colin wants the sync to be in that
one direction, given the names of the directories, he should be aware
that rsync does a uni-directional sync and that new or changed files in
/storage/backups/stuff will be deleted using rsync -av --delete.
Niall
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!