LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 04-04-2006, 11:11 AM   #1
booyaa
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
Backup


Hello:

I have a question about backing up configs and stuff. What is the easiest way to back up an entire system? Is there a convention to back up certain applications and config files?
 
Old 04-04-2006, 12:51 PM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Are you talking about one linux, or many linuces, or linux+*doze, or linux+*BSD?
 
Old 04-05-2006, 12:33 PM   #3
booyaa
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Original Poster
Rep: Reputation: 0
I am a noob and I want to backup my Linux installation (1 machine) and all the config files/apps/ and stuff I did to get this thing up and running. Is there a way to do this and do a fast restore in case of failure?
 
Old 04-05-2006, 06:20 PM   #4
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,275

Rep: Reputation: 61
There is a program called Ghost for Unix and is supposed to make an exact image of the hard drive, this can be used to restore a system after a disaster, just search google for more information, this maybe what you are looking for.
 
Old 04-06-2006, 12:09 AM   #5
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Quote:
Originally Posted by booyaa
I am a noob and I want to backup my Linux installation (1 machine) and all the config files/apps/ and stuff I did to get this thing up and running. Is there a way to do this and do a fast restore in case of failure?
The quickest, easiest, and most simple thing to do, that will work on every *NIX system is to tar your whole system. It depends on how many partitions you are spread across how you accomplish this.

There are many, many backup threads on this forum and you should do a search with keywords backup best

You could do something like

Code:
tar -cvjf mysystem.tar.bz2 /
that will make a backup. And if you need to restore it, boot a live CD or other machine, and cd to /

then do

Code:
tar -xvjf mysystem.tar.bz2
 
Old 04-06-2006, 07:10 PM   #6
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,275

Rep: Reputation: 61
Quote:
Originally Posted by Randux
The quickest, easiest, and most simple thing to do, that will work on every *NIX system is to tar your whole system. It depends on how many partitions you are spread across how you accomplish this.

There are many, many backup threads on this forum and you should do a search with keywords backup best

You could do something like

Code:
tar -cvjf mysystem.tar.bz2 /
that will make a backup. And if you need to restore it, boot a live CD or other machine, and cd to /

then do

Code:
tar -xvjf mysystem.tar.bz2
Not a bad idea but tarring won't backup the partitions or the bootloader if its on the MBR. You would have to create the partitions and the bootloader manually and also make sure the /etc/fstab file matches the new partitions.
 
Old 04-07-2006, 12:07 AM   #7
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
You are right, but this works on every linux system and has no external dependencies. With a live CD, you can fix everything you mentioned in a couple of minutes. I tried this on my own system when I was rearranging the partition table, and I was able to bring up my new system in a new partition in less than five minutes (not counting the untar )

It's probably also a good idea to become familiar with native *NIX features because coming from *doze which leaves the user helpless, you can do anything you need to do either from inside *NIX or from another *NIX system on the same machine. It's quite nice, actually

I'd like to see someone use native *doze features to backup his system, repartition his HD, and restore his system in another partition (of a different size and filesystem) on the same machine, and have it all work. Good luck

Last edited by Randux; 04-07-2006 at 12:11 AM.
 
Old 04-07-2006, 02:42 AM   #8
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
I tend to backup a list of all the packages I have installed, the contents of /etc, /usr/local/etc, /root /proc/config.gz and a file containing information about my partitions.

It means restoring takes a little longer as I have to manually reinstall all the packages in my list, etc. But then I can just copy the config files back.

As I said, takes a little longer to restore, but the big advantage is that each backup takes only a few megabytes on disk.
 
Old 04-07-2006, 02:46 AM   #9
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by Randux
I'd like to see someone use native *doze features to backup his system, repartition his HD, and restore his system in another partition (of a different size and filesystem) on the same machine, and have it all work.
So would I! In fact I would love to see this *doze OS that every one keeps referring to in use so I could try it!

I've tried googling it but alls I can find is articles about students falling asleep in lectures and more people on forums referring to it, has anyone got a link?

Last edited by phil.d.g; 04-07-2006 at 02:48 AM.
 
Old 04-07-2006, 08:52 PM   #10
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,275

Rep: Reputation: 61
Quote:
Originally Posted by Randux
You are right, but this works on every linux system and has no external dependencies. With a live CD, you can fix everything you mentioned in a couple of minutes. I tried this on my own system when I was rearranging the partition table, and I was able to bring up my new system in a new partition in less than five minutes (not counting the untar )

It's probably also a good idea to become familiar with native *NIX features because coming from *doze which leaves the user helpless, you can do anything you need to do either from inside *NIX or from another *NIX system on the same machine. It's quite nice, actually

I'd like to see someone use native *doze features to backup his system, repartition his HD, and restore his system in another partition (of a different size and filesystem) on the same machine, and have it all work. Good luck
Yes linux is very versatile in that way, I was just thinking from a noob perspective that it may be a bit more complex. Having to mount hard drives and chroot and create files that they may not understand just yet, since coming from windoze.

Your idea has given my something to try, making partitions is particular easy under linux, maybe make a script to read the backed up /etc/fstab file and create the new partitions based on it.

Create your own bootcd to run this script and then extract the tar file, make the bootloader and anything else it needs.
 
Old 04-08-2006, 12:22 PM   #11
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
That sounds like an interesting idea. It might not be 100% though because the fstab doesn't have to contain everything normally used by that linux. It does have to contain root though
 
  


Reply

Tags
backup, imp


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you backup? ninmonkeys Linux - General 7 11-09-2004 11:02 PM
can I backup a root disk and boot from the new backup disk linuxbkp Linux - Enterprise 3 10-15-2004 06:42 PM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM
backup help Neomaster Linux - General 3 06-06-2003 12:02 PM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM


All times are GMT -5. The time now is 06:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration