Incremental backup with tar? 

Newsgroups: comp.os.linux.hardware, comp.os.linux.misc, comp.os.linux.setup,
redhat.servers.general
Date: 2000/05/06
>i try to do an incremental backup with tar on an 4mm DAT.
>first i backed up all files on an multiple volume (3 tapes) now i want to
>backup every night only the files that are new or have changed. is that
>possible with tar/cron without using an expensive backup-application?
>after the backup an email should sent to the admin with a list of the
>backuped files (tar tf /dev/st0 >backup.log). the problem is how to send
>this log-file to the admin/root?

If you are using GNUtar there are several options to control which files are archived, the best of which is "—listed-incremental filename". If 'filename' does not exist, it is created and you get a full backup. If it does exist, you get all files newer than the last run and everything (including old files) under renamed directories. Additional information is included in the archive to optionally allow you to delete files during the restore that were not present at the time the backup was taken (there is no way to do this with cpio or non-GNU tar). The —listed-incremental file is modified in place after an incremental run.

If you want to base all incrementals from the initial full, you should copy the file before each incremental and replace it with the original afterwards.

If you want to create a 'chain' of incrementals that must be restored in sequence, leave the modified file each time. A simple script can do this, including mailing the output to the admin.

Or, if you have more than a few filesystems you might want to install the free 'amanda' system that not only performs this scripting across machines but also does the scheduling of full/incrementals to match the tape space you have.

Les Mikesell