[luau] thumb drive, incremental backup
Hawaii Linux Institute
wp at HawaiiLinux.us
Tue Sep 30 06:52:00 PDT 2003
one of the most useful features of a thumb drive (or a USB hard disk) is
to do incremental backups. I used to rely on a DOS program called
xtree/ztree to do incremental backups in Windows, but in Linux, the task
is substantially easier.
I am tossing in my way of doing incremental backups, if you have other
approaches and/or comments, please share them with us:
First step, find all the files that have been modified in the past, say,
7 days (for weekly backup), and save all their file names into a file
called, say, backup.weekly:
find / -mtime -7 -print backup.weekly
Then, compress all those files into a tarball and store in into your
thumb drive (which, I assume, has been mounted as /mnt):
tar -cvz -T backup.weekly -f /mnt
Comment: if you are using the thumb drive merely to do backups, of
course, you don't need the bind option as I mentioned earlier. Also, if
you don't want to incrementally back up the entire disk, you can replace
the slash ("/") with whatever directory you're interested. For win4lin
users, you can do a daily backup of your windows data by replacing "/"
with "mydata", and the number "7" with "1", as follows:
find /home/xxxxx/mydata -mtime -1 -print backup.daily
Wayne
More information about the LUAU
mailing list