LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-17-2004, 02:48 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
tar my whole system?


Would a person be able to tar their entire system, then save it on a dvd? Would you later be able to uncompresses it on a fresh partition and have a fully installed system?
 
Old 04-17-2004, 03:43 PM   #2
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
i suppose its possible... to untar it, you'd need to do it from a boot disk, but it still may not work simply being untarred... i would consider imaging the disk.
 
Old 04-17-2004, 03:49 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"Would a person be able to tar their entire system, then save it on a dvd? Would you later be able to uncompresses it on a fresh partition and have a fully installed system?"

Yes. I have done it using 2 CDs to save an entire system and then restore it. tar to CD-RW is my standard weekly backup.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 04-17-2004, 10:20 PM   #4
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
Quote:
Originally posted by jailbait
"Would a person be able to tar their entire system, then save it on a dvd? Would you later be able to uncompresses it on a fresh partition and have a fully installed system?"

Yes. I have done it using 2 CDs to save an entire system and then restore it. tar to CD-RW is my standard weekly backup.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
Do you tar your whole system? Or just specific folders(/etc, /home, et al)?
 
Old 04-17-2004, 10:27 PM   #5
Phorem
Member
 
Registered: Nov 2003
Location: Toronto, Canada
Distribution: Gentoo AMD64
Posts: 374

Rep: Reputation: 30
How would one make a bootable image (dvd or cd) to reformat and install my entire system back to where it was. I have it perfect right now and i don't want to do it again for a while:-)
 
Old 04-17-2004, 11:24 PM   #6
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I think it would be done the same way you do a stage three install of gentoo. Only all of the configuration would already be done. You would just unpack the tarball you created instead of the gentoo stage three tarball.
 
Old 04-18-2004, 11:42 AM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"Do you tar your whole system? Or just specific folders(/etc, /home, et al)?"

I tar a series of directories (/boot., /dev, /etc, and so on). I include every directory in my system. I ge everything but /usr on a single CD. /usr takes a CD and a half.

"How would one make a bootable image (dvd or cd) to reformat and install my entire system back to where it was. I have it perfect right now and i don't want to do it again for a while:-)"

To solve that problem I wrote LifeBoat. I use LifeBoat to create a bootable CD which I can use to restore the tar files (and I have done so several times). LifeBoat comes in handy as a general purpose rescue CD.

http://users.rcn.com/srstites/LifeBo...home.page.html
___________
Steve Stites
 
Old 04-18-2004, 12:59 PM   #8
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I have been reading man tar, still not sure what options i need to preserve it with. What do you use.

Code:
tar -c  -p -P usr.tar usr/
is this close?

Last edited by shanenin; 04-18-2004 at 01:41 PM.
 
Old 04-18-2004, 03:29 PM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"I have been reading man tar, still not sure what options i need to preserve it with. What do you use."

Here is one of the three scripts that I use to back up my system. I have two other scripts to backup parts of /usr:

-------------------------------------------------------------------------------------------------------
# This command backs up Linux to CD-RW as gzip tar balls

# Change tar-a.cd-rw.backup date
touch /root/data/backups/tar-a.cd-rw.backup.date

tar -czf /tmp/bin.tar.gz /bin

tar -czf /tmp/boot.tar.gz /boot

tar -czf /tmp/dev.tar.gz /dev

tar -czf /tmp/etc.tar.gz /etc

tar -czf /tmp/home.tar.gz /home

tar -czf /tmp/initrd.tar.gz /initrd

tar -czf /tmp/lib.tar.gz /lib

tar -czf /tmp/misc.tar.gz /misc

tar -czf /tmp/opt.tar.gz /opt

tar -czf /tmp/root.tar.gz /root

tar -czf /tmp/sbin.tar.gz /sbin

tar -czf /tmp/var.tar.gz /var

# The creation date of /cdrom/cd-rw.tar-a.backup.date is the date the CD-RW tar
# backup was created.
touch /tmp/cd-rw.tar-a.backup.date

# Create a CD image file
mkisofs -o /makeCD/cd.image -r \
-U \
-V Fedora_backup \
/tmp/cd-rw.tar-a.backup.date \
/tmp/bin.tar.gz \
/tmp/boot.tar.gz \
/tmp/dev.tar.gz \
/tmp/etc.tar.gz \
/tmp/home.tar.gz \
/tmp/initrd.tar.gz \
/tmp/lib.tar.gz \
/tmp/misc.tar.gz \
/tmp/opt.tar.gz \
/tmp/root.tar.gz \
/tmp/sbin.tar.gz \
/tmp/var.tar.gz

# Erase a blank CD-RW
cdrecord -force blank=fast dev=0,0,0 speed=24

# Copy the CD image file to CD-RW
cdrecord -data -eject speed=24 dev=0,0,0 /makeCD/cd.image

# Clean up
rm /makeCD/cd.image
rm /tmp/*.tar.gz
rm /tmp/cd-rw.tar-a.backup.date
-------------------------------------------------------------------------------------------------------

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 04-18-2004, 04:58 PM   #10
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I was playing aroung with the tar options you used. As far as I noticed that does not preserve ownership, is that correct?

Do you manually change back the ownership of files after you reinstall?
 
Old 04-18-2004, 07:33 PM   #11
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"Do you manually change back the ownership of files after you reinstall?"

I am not sure but I think that I have to change ownerships after I restore. That is only necessary for the files in /home and I can change them all with one command per user:

chown username:users /home/username -R

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 04-18-2004, 08:24 PM   #12
Phorem
Member
 
Registered: Nov 2003
Location: Toronto, Canada
Distribution: Gentoo AMD64
Posts: 374

Rep: Reputation: 30
Thanks for the help Jailbait. I'm going to give lifeboat a go. I haven't opened it yet, but i hope i can write to my dvd+r. That would be sweet. I guess if cdrdao supports it, hopefully this will too.
 
Old 04-18-2004, 08:35 PM   #13
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"i hope i can write to my dvd+r. That would be sweet. I guess if cdrdao supports it, hopefully this will too."

LifeBoat uses two cdrecord commands to write to CD-R or CD-RW. I have never tried it on DVD because I don't own a DVD. If you change LifeBoat to work on DVD how about sending me the changes to add to LifeBoat.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 04-18-2004, 08:36 PM   #14
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,907

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
There are two tar options you can add to the listed tar commands which will preserve permissions and ownership of files: -p (preserve permissions) and --same-owner.

You could probably get away without backing up much of what is on your system. For instance, anything you installed from CD, with the exception of config files in /etc. Why back up if you still have the CD's? Just reinstall, then restore the configs from backup. Then also backup any apps you installed from download (not on CD), unless you kept a copy in an archive somewhere ( you did, didn't you?).

Last edited by bigrigdriver; 04-18-2004 at 08:43 PM.
 
Old 04-23-2004, 11:10 PM   #15
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
hey Shanen, why'd you post this on TheScreenSavers? I dislike that place now. Every episode I see on there says remedial stuff like "Learn how to speed up your PC!", then they say things that are Windows-specific. Not only that, but a simple google search could tell people the exact same thing. Then they advertise video editing software. Somehow, they end up praising Microsoft's Video Encoder, God only knows why. When I used that program, I set the settings to as high as they would go, and the picture quality was still horrid. I was trying to split Band of Brothers episodes so they could be viewd as chapters on VCD's instead of one huge video file....

Bottom line; The Screen Savers is for Windows users, they seemingly ignore Linux and Apple.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
Tar syntax to backup system... robbow52 Debian 5 08-05-2004 11:35 AM
system backup with tar tjay Linux - General 3 06-09-2004 11:32 AM
Backup entire system with tar sln Linux - General 2 04-30-2004 03:32 AM
tar file name with system date mnauta Linux - General 4 12-19-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:54 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration