Go to the first, previous, next, last section, table of contents.


5.2 Using tar to Perform Incremental Dumps

@UNREVISED

Performing incremental dumps is similar to performing full dumps, although a few more options will usually be needed.

A standard scheme is to do a monthly (full) dump once a month, a weekly dump once a week of everything since the last monthly and a daily every day of everything since the last (weekly or monthly) dump.

Here is a sample script to dump the directory hierarchies `/usr' and `/var'.

#! /bin/sh
tar --create \
 --blocking-factor=126 \
 --file=/dev/rmt/0 \
 --label="`hostname` /usr /var `date +%Y-%m-%d`" \
 --listed-incremental=/var/log/usr-var.snar \
 --verbose \
 /usr /var

This script uses the file `/var/log/usr-var.snar' as a snapshot to store information about the previous tar dump.

The blocking factor 126 is an attempt to make the tape drive stream. Some tape devices cannot handle 64 kB blocks or larger, and require the block size to be a multiple of 1 kB; for these devices, 126 is the largest blocking factor that can be used.


Go to the first, previous, next, last section, table of contents.