Thread: Rsync
View Single Post
  #4 (permalink)  
Old 07-23-2008, 06:18 AM
H.Janssen
 
Posts: n/a
Re: Rsync

Hello Mtek,






Mtek wrote:

>> >RSYNC. *Would this be a better solution? *If yes, how would I do it??

>>


Apart from the goodies described before, rsync has another nice option:
you can make several copies of your data with minimal loss of diskspace:
rsync is able to make copies with hardlinks if the data are identical.
(--link-dest=DIR)
In that case, the new version is a hardlink to the old version, so you have
two directory entries pointing to the same data. If the file is changed,
original and new file are stored separately. Of course, your database will
continuously change, if this is the major part, it does not make that much
difference.
Anyhow, if things get messed up, you have two or more generations...
You can implement schemes like, in shorthand notation:

rsync --link-dest=1 ..... 0
if success ( important!!!)
rm -rf 3
mv 2 3
mv 1 2
mv 0 1


In addition, rsync is an excellent program to transfer data via slow links,
e.g. to a remote system for backup, because only changed data are
transferred. Adding a small message to a big plain text email file means
only transfer of block checksums and the last "blocksize" bytes....

Kind Regards,
H,Janssen

Reply With Quote