1752790 Members
6369 Online
108789 Solutions
New Discussion юеВ

Re: Backing up Linux

 
SOLVED
Go to solution
Charles Holland
Trusted Contributor

Backing up Linux

Using SuSE Enterprise Server 7 for IA-32 on a
now HP ML530 system. What would anyone suggest to use for backing up the file systems.
I've tried tar and it gets to the /proc directory, processing the file kore (I think)
gets and error, and then reboots. No sorry, can't remember what the error message says. I've looked through the Linux system here at HP Forums and don't find any topics about "backup" and Linux. The OS has Amanda on it, but so far haven't figured it out. Just looking for other opinions.
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
6 REPLIES 6
Stuart Browne
Honored Contributor

Re: Backing up Linux

There are plenty of Backup solutions for Linux, some of them free, and others that cost money.

Things like Arkeia, Backup Edge, BRU are just a few of the commercial products available.

Personally, I use "Backup Edge", and 'cpio' in custom written scripts.

It all depends on the security you want (BE offers thigns like bit-level verify etc.), and how much you're willing to pay.

With relation to the error you are getting using 'tar' however, you need to exclude the 'proc' file system (as it isn't real). A simple '--exclude /proc' should suffice.
One long-haired git at your service...
Simon Galton
Frequent Advisor
Solution

Re: Backing up Linux

Charles --

The file /proc/kcore is a root-accessible-only map of system memory. You'll notice it's the same size as all the physical memory installed in your system.

As Stuart has said, you don't need to backup /proc -- it's a virtual file system which represents internal system states, process information, etc. It's actually very nifty, but there's no user data there.

I would create a list of mountpoints you want to backup, then decide what value you place on the data in each. If this is mission critical stuff, you may want to investigate a commercial product. I've had a lot of experience with Legato's Networker product, which can run on a variety of platforms, including Linux, and from any of those platforms can backup a number of platforms, including Linux. As for backup hardware -- a simple tape stacker should make your life a lot easier.

If a manual tar process is fine, then create a work list and a simple script:

Perhaps call your worklist /etc/backupworklist:

/home
/etc
/var
/usr
whateverelseyouwant

Then have a simple backup script:

#!/bin/sh

admin="your@email.address"
tapedev=/dev/st0
worklist=`cat /etc/backupworklist`
backuplog=/var/tmp/backup.log
date=`date`

(tar cvpf $tapedev "$worklist" > $backuplog) && mt -f $tapedev rewoffl

mail -s "Backup log: $date" $admin < $backuplog
#end of script

This is very, very rough (and, BTW, untested, I just typed it in the reply box - if you decide to try this out, please be careful).

You'll notice that I used a lot of variables in the script -- by keeping the admin name, the tape device, the log, et al in variables, I can change them later without hunting through the listing, and without messing around in the heart of the script...

Good luck,
Simon

Simon Galton
Frequent Advisor

Re: Backing up Linux

Oh, another BTW about that script:

I used the "&&" construct -- what this does is only allows the command after the "&&" to run if the command before the "&&" exits successfully.

So, if the tar fails, the tape will not rewind and eject from the drive. If, however, the tar command works fine, the tape will be ejected and waiting. This is a nice visual indicator of backup success... :)

Simon
Chakravarthi
Trusted Contributor

Re: Backing up Linux

with tar you can have --exclude="" or -X options,,
Tim Clarke
Advisor

Re: Backing up Linux

Have a look at the www.amanda.org project - very good gnu backup from the Univ of Maryland. Multiple machines, cycles, logs, you name it.
Charles Holland
Trusted Contributor

Re: Backing up Linux

To all thank you. Stewart thanks but trying to get by without purchasing. Simon will explore the possibilities. Did get the system to backup using tar had to specify it as
--exclude=proc if I put it as /proc it didn't seem to work. Need to just make it slicker now. I had seen that parameter in the man page but I thought it only worked for files and not directories. Gained knowledge. Once the tar is in place I'll work on getting Amanda figured out. Thanks to all.
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein