LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Newbie (http://www.linuxquestions.org/questions/forumdisplay.php?f=8)
-   -   Backup Strategy (http://www.linuxquestions.org/questions/showthread.php?t=559441)

jadurant 06-05-2007 06:20 PM

Backup Strategy
 
i have been backing up my whole system using a bash script (yes i have been burned, thank you). it occured to me that this may not be the most efficient or effective strategy.

in the event of a catastrophic failure i could extract only my critical directories (~/ and /var/www) to a new linux configuration. what would happen if i restored my old system completely to a different hardware platform? could i just restart the machine and be home free or would my configuration from the old system screw everything up?

tnx,
jad

pljvaldez 06-05-2007 06:38 PM

I've been fighting with this myself lately. In my limited experience, restoring an image to different hardware hasn't worked very well.

I settled on just backing up critical directories (/home and /etc). More often than not, my need for recovery is because I accidentally deleted something I wanted to keep.

I must caveat that with saying that I use dpkg in Debian to keep a list of what's installed on my system. There's a mechanism for taking that list and importing it into dselect, then doing an upgrade that installs the same packages (though not necessarily the same versions). Basically it looks like this
Code:

dpkg --get-selections > installed.txt
aptitude update && dselect update
dpkg --set-selections < installed.txt
apt-get dselect-upgrade

It works across machines, even across architectures. Then I just weed through my backed up /etc to replace the config files I need. You do have to be careful though to make sure config files haven't changed if you get a newer program version installed than on the old machine.


All times are GMT -5. The time now is 08:14 AM.