LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Backup (http://www.linuxquestions.org/questions/linux-general-1/backup-431628/)

booyaa 04-04-2006 12:11 PM

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?

Randux 04-04-2006 01:51 PM

Are you talking about one linux, or many linuces, or linux+*doze, or linux+*BSD?

booyaa 04-05-2006 01:33 PM

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?

fotoguy 04-05-2006 07:20 PM

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.

Randux 04-06-2006 01:09 AM

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

fotoguy 04-06-2006 08:10 PM

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.

Randux 04-07-2006 01:07 AM

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 :p

phil.d.g 04-07-2006 03:42 AM

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.

phil.d.g 04-07-2006 03:46 AM

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?

fotoguy 04-07-2006 09:52 PM

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 :p

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.

Randux 04-08-2006 01:22 PM

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 :p


All times are GMT -5. The time now is 03:01 PM.