LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2007, 12:36 PM   #1
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Rep: Reputation: 15
Can you tar or rename / ?


Hi,

My situation involves a lot of Linux testing where I need to get back to a clean Linux OS state repeatedly after testing.

What techniques could I use to do this?

My newbie thinking (please don't try this as home) was that after I installed and tweaked the system to the init state, I would:

1. tar / to root.tar

when I needed to go back to that state:

2. rename / to oldroot
3. untar root.tar
4. delete oldroot
5. reboot

The commands may not allow this. Also, this may not work as Linux likes to touch files when it does stuff.

thanks for any ideas,
fred
 
Old 06-29-2007, 12:41 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
You can't "rename /" because it is "root" and is the top (or bottom) of the file heirarchy.

If you have a burner you might want to get something like mondorescue which allows you to save your system as loaded then reload it later.

Alternatively you could try something like VMWare or Xen to make virtual servers that you can clone and trash at will under the main server install.
 
Old 06-29-2007, 12:58 PM   #3
ComputerBob
LQ Newbie
 
Registered: Jun 2007
Location: The Beautiful Sunshine State
Distribution: Debian Squeeze
Posts: 28

Rep: Reputation: 15
It doesn't compress my root partition, and it's not especially fast, but I use a bootable LiveCD of GParted to copy my PC's entire root partition onto my external hard drive. (I use the bootable LiveCD so that my PC's root partition won't be "in use" when I copy it.) Then, when I want to get things back to the way they were, I use the bootable LiveCD of GParted to delete my PC's messed-up root partition and copy my backup of it onto my PC from my external hard drive.

In the past year, I've experimented with things enough that I've had to restore my root partition to its previous pristine state at least 5 times, and GParted has never given me any problems.

Last edited by ComputerBob; 06-29-2007 at 01:01 PM.
 
Old 06-29-2007, 01:06 PM   #4
stealth_banana
Member
 
Registered: Mar 2004
Location: Scotland
Distribution: Debian Sid / Kubuntu
Posts: 170

Rep: Reputation: 30
Why don't you use partimage ( http://www.partimage.org/ )

You can compresss the image.

Run it from a live cd and back up to another partition or external HD. When you want to restore, just chuck it back on. Quick and painless.
 
Old 06-29-2007, 01:19 PM   #5
ComputerBob
LQ Newbie
 
Registered: Jun 2007
Location: The Beautiful Sunshine State
Distribution: Debian Squeeze
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by stealth_banana
Why don't you use partimage ( http://www.partimage.org/ )

You can compresss the image.

Run it from a live cd and back up to another partition or external HD. When you want to restore, just chuck it back on. Quick and painless.
That's a really good question - one that I'm going to have to think about. I started using GParted back when I didn't know about all of the other Linux backup choices.

At one point, I did start using Partimage instead of GParted, but then I switched to using the GParted/Clonezilla bootable LiveCD, because IIRC, Clonezilla uses Partimage, but Clonezilla adds some feature(s) of its own.

Unfortunately, even as recently as last month, Clonezilla insisted on rewriting GRUB on my MBR every time I restored my Linux root partition, EVEN when I told it NOT to. That messed up my Windows XP dual-boot's MBR every time, forcing me to repair XP's MBR and then manually reinstall GRUB every time. After a few times of doing that, I finally gave up on using Clonezilla, went back to using GParted, and (probably) forgot all about using Partimage itself.

So maybe it's time for me to take another look at using Partimage to image my Linux root partition. Thanks!

Last edited by ComputerBob; 06-29-2007 at 01:24 PM.
 
  


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 03:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 11:55 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
tar | ssh (tar > .tar) syntax issues EarlMosier Linux - Software 6 12-21-2006 01:28 AM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 07:30 AM


All times are GMT -5. The time now is 06:24 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