DNA Cafe | Download | FreeSoftware | Java | Links
Note and tips for backup tools.
afio makes cpio POSIX.1 format archives. afio can make compressed archives that are much safer than compressed tar or cpio archives. Licensed under LGPL.
Create an archive with compressed files on current path:
$ find . -print | afio -o -v -Z -L logfile archive
Unpack an archive with compressed files:
$ afio -i -v -Z archive
Unpack the file foobar in an archive with compressed files:
$ afio -i -v -Z -y foobar archive
Unpack an archive with compressed files and protecting newer existing files:
$ afio -i -v -Z -n archive
Show list of table of contents of archive:
$ afio -t -Z archive
Read archive and verify it against filesystem:
$ cd archived_directory
$ afio -r -Z archive
cpio copy files to and from archives.
In copy-out mode, cpio copies files into an archive.
$ find . -print | cpio -o -v > archive
In copy-in mode, cpio copies files out of an archive or lists the archive contents.
$ cpio -i -d -m -v < archive
$ cpio -i -t < archive # Print a table of contents.
cpio supports many archive formats. If you don't have any reason, use portable format as odc, newc and crc, because you may work on another machine as archive. To use archive format of GNU cpio is -H FORMAT or --format=FORMAT.
tar is an archiving program designed to store and extract files from an archive file known as a tarfile.
Create an archive of current directory:
$ tar -cvf archive.tar
$ tar -cvf /dev/tape_device . # to tape device
Extract archive to current directory:
$ tar -xvf archive.tar
$ tar -xvf /dev/tape_device # from tape device
$ tar -xvzf archive.tar.gz # GNU tar
$ zcat archive.tar.gz | tar xvf - # non-GNU tar
Show list of table of contents of archive:
$ tar -tvf archive.tar
$ tar -tvf /dev/tape_device # from tape device
$ tar -tvzf archive.tar.gz # GNU tar
$ zcat archive.tar.gz | tar tvf - # non-GNU tar
Following tools are useful too.
dd convert and copies a file using specific input and output blocksizes.
dump examines files in a filesystem, determines which ones need to be backed up, and copies those files to a specified disk, tape or other storage medium. Subsequent incremental backups can then be layered on top of the full backup. restore command performs the inverse function of dump. dump's advantage are unmounted file systems dump, keeping the time of the access for each files and it works fast. This tool from BSD.
gzip compress the regular files, it reduces the size of the named files. Compressed files can be restored to their original form using gzip -d, gunzip or zcat.
bzip2, same as gzip, compress the regular files, it reduces the size of the named files.
Compressed files can be restored to their original form using bzip2 -d,
bunzip2 or bzcat.
Compression is generally considerably better than achieved by gzip,
but more slowly. Licensed under original License.