On Tue, Jan 28, 2003 at 02:30:50PM +0200, Niko Nyman
wrote:> Hi,
>
> This is a newbie type'o'question so I'm most probably talking
about
> something I know nothing about ;)
>
> Would it be possible to archive files on a removable drive, save the
> checksums for the archived files, and later compare existing files against
> the saved checksums without plugging in the removable drive? I imagine in
> theory this would allow for an easy incremental-backup-to-CD application
> based on rsync to be written for OS X -- would be useful as there seems to
> be no good backup software based on non-proprietary formats.
Your particular idea is far outside the scope of rsync.
List regulars may ignore the rest of this email, i'm
feeling a bit too gracious.
There are any number of approaches to this.
Most backup systems don't use checksums to decide what to
write to an incremental anyway. The most use timestamps.
The easiest is to use
cd /
find $directory -mtime -$days | backup_command
or for a more sophisticated approach with a minimum of overlap
cd /
touch /var/backup/newstamp.$directory
find $directory -newer /var/backup/stampfile.$directory | backup_command
mv /var/backup/newstamp.$directory /var/backup/stampfile.$directory
or
find -ls >somefile
wait awhile then
find -ls >anotherfile
then
diff somefile anotherfile
Is another approach that will effectively generate the same
list that rsync would unless the --checksum option were
specified.
If you really want to thrash your disks computing checksums
i'd suggest you look into any of (man -k is your friend)
sha1sum (1) - compute and check SHA1 message digest
sum (1) - checksum and count the blocks in a file
md5sum (1) - compute and check MD5 message digest
cksum (1) - checksum and count the bytes in a file
of which sha1sum and md5sum can check against a previously saved list
though but not identify new files or changed directories.
You could also use something like tripwire.
In reality where rsync shines is in using online disks.
There is an example of a simple backup system on the rsync
website. http://www.pegasys.ws/dirvish has a more sophisticated
backup system. There are also a few other systems out there
that use rsync.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt