View Single Post
  #2   (View Single Post)  
Old 19th November 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

The pax tool can use cpio or tar formats and can manage multiple volumes, but it has the limitations of the underlying format. On the other hand, dump/restore has none of the other formats' restrictions, but it cannot handle multiple volumeswith media that does not have end-of-volume marks, so it is limited to tape drives. For the same reason, it cannot manage multivolume via named pipes.

I use dump and restore to avoid the limitations of tar, gtar, cpio, or pax. The output is piped through gzip and piped to a storage server via ssh. On the storage server, offsite backup is done to DVD+RW, with dump again, and the multivolume is managed through through two tools: flyisofs and shunt, from sysutils/shunt. This breaks the streams into 4.3GB chunks piped into growisofs, from sysutils/dvd+rw-tools.

Here's an example of using shunt and flyisofs for backup, then shunt for restore. The files to be backed up are already gzipped dump files, but you could add piping to openssl enc, gzip, what ever you want. .
Code:
Backup:

# shunt -c 'dump -b 64 -0af - <files>' + \
    'flyisofs fbc=2090000 mbc=2295104 | growisofs -Z /dev/rcd0c=/dev/fd/0'

Restore:

       # shunt 'mount /dev/cd0c /mnt;cat mnt/*;umount /mnt' + -c 'restore -rf -'
Avoid using sudo on shunted pipes -- this complicates administration in the event you must stop operations and kill related processes.
Reply With Quote