chris wrote:
> cp -r $1/* $2 

Careful, * can't usually match an infinite number of files.  While I'm not an
expert on which shells, operating systems, and c libraries have which limits,
it's safer to just say:
cp -r $1 $2
or:
cp -r $1/ $2

I have a directory of files I really don't want to lose, so I want to keep
them on 3 machines so I do:

for i in hosta hostb hostc; do
        echo "syncing with host $i";
                if [ ! `hostname` == $i ]; then
                        echo "sending files to $i\n";
                        rsync $FLAGS . $i:$DIR/;
                        echo "retrieving files from $i\n";      
                        rsync $FLAGS $i:$DIR/ .;
                fi
done;

That way whichever machine I sit at I can just run the sync script and get the
newest files irregardless of which of the 3 machines I edited those files on 
last.

But if you don't want to write your own scripts I'd check out rdiff-backup,
it's pretty slick for storing things like a snapshot of your directory daily
for the last 2 weeks, while not costing much more disk than a single copy of
your directory.
_______________________________________________
vox-tech mailing list
[email protected]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to