Quickie backup over the net with GNU tar

If you want to back up a bunch of files over a network (or locally), one approach is to go into the directory you want to back up, and execute:

tar cvpf - . | tar xpv -C /share/backupetc092901

This will save permissions, as well as grab hidden files, dates, symbolic links, /dev stuff, etc. This example sticks everything in the current directory and subdirectories into (in this example) /share/backupetc092901, which happens to be on our NFS server. Works well here at NetAdminTools. Read the tar man page (yow!!!) to customize further. Tar can be much better behaved than cp. Make sure you use GNU tar, since other tar versions don’t work as well. One source is: ftp://aeneas.mit.edu/pub/gnu/tar.