Title: RE: Sync a folder?

DuSTiN KRySaK wrote:
> Hi there - I am wondering what the best command is to use to sync one
> folder with another? I am simply backing up a folder to another
> drive, and I know I could just copy over, but I want the backup to
> have any files removed that I may remove out of the original....
>
> I'm just going to throw it in a shell script and get cron to run it
> nightly.
>

<OPINION>
Try rsync.  It's a great tool for doing exactly what you want in a single command.

Probably something like:

rsync -Caz /source_dir/ /destination_dir

Check out the man page for rsync to make sure what switches you need.  Rsync will also work across machines if you need it to.

Only need to put the one command with the correct switches in cron, so you wouldn't need to create a shell script.
</OPINION>

HTH,
Brad Sites

Reply via email to