|
|
Backup
with Pax and Afio in Linux
pax
The new, POSIX (IEEE Std 1003.2-1992, pages 380–388 (section
4.48) and pages 936–940 (section E.4.48)), all-singing,
all-dancing, Portable Archive Interchange utility. pax will
read, write, and list the members of an archive file, and will
copy directory hierarchies. pax operation is independent of the
specific archive format, and supports a wide variety of
different archive formats.
pax implementations are still new and wet behind the ears.
Installing pax in Debian using the
following command
# apt-get install pax
$ pax -rw -p e . newdir
or
$ find . -depth | pax -rw -p e newdir
Examples
The following example creates an archive file from all the files
under the current directory.
pax -w . >/dir/archive
The following example extracts all the components of an archive
file and puts them into the current directory.
pax -r * </dir/archive
The following example locates all the files that have changed in
the past week (7 days) and archives them onto a diskette:
find c:/ -mtime 7 | pax -w >a:/archive
If you want more options and how to use check pax manpage
here
afio
afio is a better way of dealing with cpio-format archives. It is
generally faster than cpio, provides more diverse magnetic tape
options and deals somewhat gracefully with input data
corruption. It supports multivolume archives during interactive
operation. afio can make compressed archives that are much safer
than compressed tar or cpio archives. afio is best used as an
"archive engine" in a backup script.
Installing afio in Debian using the
following command
# apt-get install afio
$ find . -depth -print0 | afio -px -0a new-dir
If you want more options and how to use check afio manpage
here
|
|