* Brian Victor <bhv1@psu.edu> [20030317 12:05 PST]: > On Mon, Mar 17, 2003 at 09:53:26AM -0800, nate wrote: > >Brian Victor said: > >> I backed up my debian installation with the following: > >> > >> tar --preserve -cv / | ssh 192.168.2.10 'cat > linuxbackup.tar.bz2' > > > >may I ask why? I have never heard of someone attempting such > >a task in that manor. > > As I mentioned in another email, cat should have been bzip2. It was the > only way I could find to store a compressed backup without running a > network file server, which seemed to be more trouble than it was worth. Well, depending on how much you care about which CPU is being used (host being backed up or host storing the backup) and how much data gets sent across your network, you may want to do the compression before sending over the network. You can use the -j flag with tar to have it use bzip2 compression, and stick with cat on the remote side. Similarly, when restoring, cat the compressed file over the network, and use -j with tar to decompress while extracting. > > >Checking tar's manpage reveals no mention of the preserve option either. > > Mine says: > --preserve > like -p -s > > >You probably do not want to try to tar up the entire root partition as > >that includes /proc which is generally a real bad thing to try to backup. > > Indeed. I've already made a note to exclude it and /dev next time. > Though it was fun watching it try to pack up /proc/kcore. ;) When figuring out which files to back up, I'd say you should avoid backing up things that can just be reinstalled. Like, for example, take the output of dpkg --get-selections, and you won't need to back up all of /usr; you can restore by simply using dpkg --set-selections. Back up your config files and your data files, but not all the binaries that can just be re-gotten by apt. Backing up just /home and /etc may suffice. good times, Vineet -- http://www.doorstop.net/ -- One nation, indivisible, with equality, liberty, and justice for all.
Attachment:
signature.asc
Description: Digital signature