LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   The Best way to Back UP my box ? (https://www.linuxquestions.org/questions/slackware-14/the-best-way-to-back-up-my-box-736677/)

WhisperiN 06-30-2009 08:32 AM

The Best way to Back UP my box ?
 
Hello there,
How you doing?

Well, I'm in love with Slack..
Kinda old friendship..!!
Even though, I'm not geek enough to rock and roll.. ;)

Any way, I have my own box at home, which I turned into a web server.
I used to use it for testing and for websites designing purposes..

That's not the point, the most important point, is I do a lot of formats and reinstall which in fact got me bored..

I was looking for a way to back up the whole system after I do a fresh installation and configuration which fit my needs.. then burn it on a CD or something like that. So when I need to do a format again.. I do a restore for my burned image to find the box ready and configured.. just like a fresh installation.

the Question is:
Is there any way to get that done?
if not.. a similar way..

Thanks a lot folks.

onebuck 06-30-2009 09:02 AM

Hi,

'Backup' is a on going debate!

You can do a search here on LQ to see the ever ongoing debate.

vharishankar 06-30-2009 09:09 AM

You can use the dd command to dump an entire disk image into an external hard drive.

As simple as:
Code:

dd if=<DISK> of=<DISK/IMAGE>
Mind you, I've never tried this before. I always take only a home directory backup using rsync.

stress_junkie 06-30-2009 09:11 AM

Quote:

Originally Posted by onebuck (Post 3591518)
Hi,
'Backup' is a on going debate!

... an ongoing struggle too!

For those of us who are professional system administrators we can fabricate a solution for our own systems without any trouble. The trouble comes when someone who is not highly technical wants to back up their system. The reason that this is a problem is that there are few if any backup products that are easy to use.

The same situation exists on other platforms; this sad situation is not unique to Linux.

The best one shot solution for backing up a newly installed and configured system is to boot a Linux live CD, use dd to back up the disk's MBR to a file on the backup disk, then back up the Linux partition to a partimage backup file on the backup disk.

Here is an example to use partimage to back up /dev/sda1 onto /dev/sdb1.
Code:

mount /dev/sdb1 /mnt/backup
dd if=/dev/sda of=/mnt/backup/sda-mbr.dd bs=512 count=1 conv=notrunc,noerror
partimage

When you run partimage without any parameters it creates an ncurses GUI so you can step through setting all of the parameters without learning the command line syntax.

Partimage will automatically save the disk's MBR in the backup file unless you use bzip compression. However I have seen a situation where partimage could not restore the MBR from its backup file. That's why I make a separate backup of the MBR.

piete 06-30-2009 09:47 AM

As already stated, there are a million and one ways to backup systems ... but perhaps what you're looking for isn't so much a backup, as a mechanism for rebuild.

A friend of mine uses it for work and although he's found some limitations, and workarounds, it's pretty cool:
http://reductivelabs.com/products/puppet/

I'll leave the digging into it as an exercise for the reader!

vharishankar 06-30-2009 09:55 AM

Thanks for the tip about partimage.

Does any Linux LiveCD ship with that utility? Because I'm thinking of a bit of experimentation and I'd like to take a full backup of my Debian installation otherwise I'll lose weeks of customization and configuration.

Alien Bob 06-30-2009 09:59 AM

Get Parted Magic: http://partedmagic.com/
It is even based on (an old version of) Slackware.

Eric

Woodsman 06-30-2009 12:40 PM

If all you want is a quick point-and-click method to image or mirror a hard drive or hard drive partition, I agree with Eric to try Parted Magic. A nice little dedicated Live CD.

If the files you want to copy are mostly static with only a few modifications, then perhaps you are looking for a way to copy the /etc directory. You can handle that with basic point-and-click in any file manager, K3B, etc.

If you want some more flexibility but want to conserve disk space and time, rsync is a good candidate as only file differences are copied. Rsnapshot is a great tool that uses rsync and is dedicated toward performing backups. If that is what you seek then perhaps the following might help:

A Backup Strategy

niels.horn 06-30-2009 08:02 PM

I have the luxury of having several desktops at home, one for each member of the family (2x Windows for the kids, 2x Slackware for the adults), plus a server (build from older parts).
Each individual stores its files in a folder on the local hard drive and rsync scripts (in windows with cygwin, but they don't even know it's there) backup data to a central "server".

Really important data I copy to media that I keep "off-site" (in a drawer at work), so that I have something even if disaster strikes at home.
When I turn on my notebook at home it recognizes that it is on my wireless network and starts syncing two-ways as well (in case I get robbed or whatever).

rsync is fast since it only copies what has changed. And you can limit the band-with so your network won't get clogged.

WhisperiN 07-01-2009 05:34 AM

Quote:

Originally Posted by stress_junkie (Post 3591535)
... an ongoing struggle too!

The best one shot solution for backing up a newly installed and configured system is to boot a Linux live CD, use dd to back up the disk's MBR to a file on the backup disk, then back up the Linux partition to a partimage backup file on the backup disk.

Here is an example to use partimage to back up /dev/sda1 onto /dev/sdb1.
Code:

mount /dev/sdb1 /mnt/backup
dd if=/dev/sda of=/mnt/backup/sda-mbr.dd bs=512 count=1 conv=notrunc,noerror
partimage

When you run partimage without any parameters it creates an ncurses GUI so you can step through setting all of the parameters without learning the command line syntax.


Great, Thanks a lot for this piece of information.. I guess this is mostly what I exactly need.
I'd like to shoot one more question if you kindly allow me to..

Now, I have backed up the system.. how do I restore it in case of a crash down, or if it got missed up?


I do really appreciate your help and cooperation..
Cheers..

vharishankar 07-01-2009 11:00 PM

On Parted Magic: It's not detecting my SATA hard drive or the USB external disk when it boots, thus rendering it useless for my purpose. I tried with different options and it simply fails to detect the drives on boot. As a result, I'm not able to use any of the tools it offers at all. Only the CD ROM drive shows up as /dev/hda.

I downloaded and tried the latest version available on their website: 4.2.

Does Parted Magic work with SATA drives at all? Has anybody verified it?

I'm very surprised because most Linux LiveCDs detect my hard disk. Ubuntu hardy heron did, but it doesn't have the disk-cloning and partition-cloing tools that Parted Magic has.

My laptop dv6000 has very standard SATA set up that is detected by most Linux LiveCDs. A liveCD that purports to offer a rescue setup should have detected it without a problem.

disturbed1 07-02-2009 03:52 AM

To create restore images, I use CloneZilla http://clonezilla.org/

multios 07-02-2009 08:40 AM

Quote:

Originally Posted by disturbed1 (Post 3593969)
To create restore images, I use CloneZilla http://clonezilla.org/

I believe clonezilla is now on the partedmagic cd :)

WhisperiN 07-03-2009 04:20 AM

Quote:

Originally Posted by multios (Post 3594290)
I believe clonezilla is now on the partedmagic cd :)

Are these two programs work via the command line?

I want something to work using the command line.

Thanks

gapan 07-03-2009 05:13 AM

I just use tar on the entire / partition if I want to make a backup of it.


All times are GMT -5. The time now is 04:52 AM.