LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-03-2006, 04:55 PM   #1
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Rep: Reputation: Disabled
backup all with tar


Hi,

I have a system with two disks and a 200GB tape drive



65G 5.8G 56G 10% /
/dev/cciss/c0d0p1 99M 74M 21M 79% /boot
/dev/cciss/c0d1p1 135G 63G 66G 49% /var/opt
none 1.5G 0 1.5G 0% /dev/shm
[manuel@sxmail backup]$

Can I do tar -czf /dev/st0 / to get the entire system, or will I need to do it for each disk?

thanks
 
Old 04-03-2006, 06:04 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,301

Rep: Reputation: 65
you may need to add an --exclude option to not get /proc.
tar by default spans filesystems. there is an option --one-file-system for making it not do so.
tar will not pick up boot sectors or a partition table. just files. you can though, make a file of your entire boot partition with dd if=/dev/whatever of=/boot/partition. than backup that file and you can restore it with tar, and write it to the partition with dd, and get a bootable system, as long as the partition is active, and same size and same place, maybe same disk model.
you can also fdisk -l > /partitions.txt perhaps to make catastrophic restorations easier.
 
Old 04-03-2006, 06:23 PM   #3
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
thanks, I'll add the --exclude and run it tonight and see what happened in the morning.

manuel


Quote:
Originally Posted by whansard
you may need to add an --exclude option to not get /proc.
tar by default spans filesystems. there is an option --one-file-system for making it not do so.
tar will not pick up boot sectors or a partition table. just files. you can though, make a file of your entire boot partition with dd if=/dev/whatever of=/boot/partition. than backup that file and you can restore it with tar, and write it to the partition with dd, and get a bootable system, as long as the partition is active, and same size and same place, maybe same disk model.
you can also fdisk -l > /partitions.txt perhaps to make catastrophic restorations easier.
 
Old 04-03-2006, 06:30 PM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,301

Rep: Reputation: 65
remember p for preserve permissions and --same-owner for restoring.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using TAR to backup / morrolan Linux - Newbie 8 01-04-2006 06:03 AM
Tar backup TheRealDeal Linux - General 7 02-08-2005 04:25 PM
Using tar for backup. TheRealDeal Linux - General 2 08-11-2004 12:46 AM
tar as backup imsajjadali Red Hat 4 02-07-2004 04:46 PM
tar: How do I backup everything !! grantm Linux - Newbie 3 07-30-2003 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration