I would like to back up all the directories, etc on a particular partition. The mount point for that partition is /, but that partition does not include all directories that branch off the / directory. 1) How do I assure that all subdirectories and files are included in a tar ball? 2) How do I tar / without including the whole linux installation, but rather only the stuff on /, so that I can restore it after I resize the partition? Thanks, Dennis J. Tuchler Professor of Law 3700 Lindell Blvd. St. Louis, Mo. 63108 314-977-2793
I would like to back up all the directories, etc on a particular partition. The mount point for that partition is /, but that partition does not include all directories that branch off the / directory.
1) How do I assure that all subdirectories and files are included in a tar ball? 2) How do I tar / without including the whole linux installation, but rather only the stuff on /, so that I can restore it after I resize the partition?
Thanks,
Dennis J. Tuchler Professor of Law 3700 Lindell Blvd. St. Louis, Mo. 63108 314-977-2793
From the "--help" of tar:
-l, --one-file-system stay in local file system when creating archive that is: tar czlf /usr/local/tmp/backupofroot.tar.gz / creates the file /usr/local/tmp/backupofroot.tar.gz, and that only contains the contents of /, not of /usr etc. ( I recommend having /tmp as a seperate mountpoint in such case... you don't want to back that up :-) -tosi
On Thursday 20 September 2001 8:53 pm, Dennis J. Tuchler wrote:
I would like to back up all the directories, etc on a particular partition. The mount point for that partition is /, but that partition does not include all directories that branch off the / directory.
1) How do I assure that all subdirectories and files are included in a tar ball? 2) How do I tar / without including the whole linux installation, but rather only the stuff on /, so that I can restore it after I resize the partition?
tar -cv /path/to/destination_file / M
On Thursday 20 September 2001 8:53 pm, Dennis J. Tuchler wrote:
I would like to back up all the directories, etc on a particular partition.
~ As CRON Jobs, it sometimes comes in handy, to back-up, 3 small jobs, morning & afternoon . . . then , if, lightening strikes, one can re-install, then restore the 3 backups, and, God & Murphy willing, all should be well :) ............................................. #!/bin/sh # backup /etc /root /boot /usr/local # exec tar czvf /bup/etc`date +%y%m%d`.tar.gz /etc /root /boot /usr/local .................................... #!/bin/sh # backup /home # exec tar czvf /bup/home`date +%y%m%d`.tar.gz /home ................................................... #!/bin/sh # backup /var # exec tar czvf /bup/var`date +%y%m%d`.tar.gz /var/named /var/cron/tabs /var/spool/mail /usr/X11R6/lib/X11/app-defaults /usr/X11R6/lib/X11/fonts/greek ............................................................................... best wishes ____________ sent on Linux ____________
participants (4)
-
Dennis J. Tuchler
-
Martin Webster
-
tabanna
-
Tor Sigurdsson