LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-29-2008, 10:52 PM   #1
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Rep: Reputation: 15
Best Linux Backup Software?


Hi guys, I've been running Fedora on my laptops for a while now and Windows on my main desktop but lately I've been wanting to make the switch from a life long Windows user to a full time Linux user (with a virtual Windows box of course...there's no escaping it!) and I've been trying to work out in my head how I would make the switch without losing any functionality. For most things, I have a solution to but as for my data backup... I keep my OS on a separate hdd from all my personal data (pictures, music, videos, etc) and I have a software backup in Windows right now that mirrors my data hdd with another hdd every night.

Also, every night before the two drivers are mirrored, I have another program sync my data hdd with my laptop and mirror those. I know of no Linux equivalent tool to do this job. Can anyone point me in the right direction? Thanks!
 
Old 12-30-2008, 12:49 AM   #2
FewClues
Member
 
Registered: Jul 2005
Location: Mission TX
Distribution: Ubuntu, Mint
Posts: 122

Rep: Reputation: 20
Remastersys gives you a great way to back up. You can back up your system with your personal settings and passwords, You can back up your system without personal data, you can back up just your personal information or you can back up just the CDFS.

The backup makes a Live DVD that can be used in any other computer. And if you need to restore just double click the install icon and its all back where it belongs.

http://www.remastersys.klikit-linux.com/
Here is the method for downloading and installing remastersys.
 
Old 12-30-2008, 12:57 AM   #3
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
I just use rsync to a spare drive.

Example:

rsync -a /home/sqdnguns/ /crap/backups/sqdnguns_home > /dev/null 2>&1

Read more about it here: http://www.manpagez.com/man/1/rsync/

Or just man rsync from a terminal.
 
Old 12-30-2008, 11:07 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Have a look at rsnapshot:
 
Old 12-30-2008, 03:50 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Your best backup software will be something you put together yourself, based on your system. As has already been mentioned, rsync is fantastic to sync'ing your user data quickly and reliably. But you also need to backup your entire system occasionally, so you can do a "bare metal" restore quickly should disaster befall you.

Here's a script that I use (note that the filesystem backups are commented out and should be uncommented/modified before use). Some of the info I collect below is not technically needed for a restore, but could make one much easier.

Code:
# Create backup directory
DATE=`date +'%F'`
TARGET=/mnt/backup/$DATE
mkdir $TARGET
cd    $TARGET || exit 1
 
# Partition, filespace and mount info
fdisk -l >fdisk-l.txt
df -h    >df-h.txt
mount    >mount.txt
cp /etc/fstab fstab.txt
 
# Installed devices info
lsusb    >lsusb.txt
lspci -v >lspci-v.txt
cat /proc/bus/input/devices >input_devices.txt
cat /proc/bus/usb/devices   >usb_devices.txt
 
# System, module and boot info
uname -a >uname-a.txt
lsmod    >lsmod.txt
dmesg    >dmesg.txt
cp /var/log/boot bootlog.txt
 
# Account info
cp /etc/passwd password.txt
cp /etc/group  group.txt
 
# Network info
ifconfig -a >ifconfig-a.txt
netstat -nlptu | cut -c1-42,69- >netstat.txt
 
# LVM info
pvs >pvs.txt
vgs >vgs.txt
lvs >lvs.txt
pvscan >pvscan.txt
vgscan >vgscan.txt
lvscan >lvscan.txt
pvdisplay >pvdisplay.txt
vgdisplay >vgdisplay.txt
lvdisplay >lvdisplay.txt
mkdir lvm_metadata
cp /etc/lvm/backup/* lvm_metadata/.
 
# /proc info
cat  /proc/cpuinfo >cpuinfo.txt
cat  /proc/meminfo >meminfo.txt
find /proc/ide  -name model -type f -print | xargs cat >ideinfo.txt
find /proc/scsi -name scsi  -type f -print | xargs cat >scsiinfo.txt
 
# MBR and Track Zero info
dd if=/dev/sda of=sda_mbr.bin    bs=512 count=1
dd if=/dev/sda of=sda_track0.bin bs=512 count=63
 
# Filesystem info
#( ! cd /boot        || tar czvf $TARGET/boot.tar.gz         -l . )
#( ! cd /            || tar czvf $TARGET/root.tar.gz         -l . )
#( ! cd /usr         || tar czvf $TARGET/usr.tar.gz          -l . )
#( ! cd /var         || tar czvf $TARGET/var.tar.gz          -l . )
#( ! cd /opt         || tar czvf $TARGET/opt.tar.gz          -l . )
#( ! cd /home        || tar czvf $TARGET/home.tar.gz         -l . )
#( ! cd /tmp         || tar czvf $TARGET/tmp.tar.gz          -l . )
#( ! cd /srv         || tar czvf $TARGET/srv.tar.gz          -l . )

# Set modes and timestamps
find . -type f -print | xargs chmod 444
find . -type d -print | xargs chmod 555
find . -print         | xargs touch
 
# OPTIONAL: Burn a DVD
#growisofs -dvd-compat -Z /dev/hdc -r -v .
 
# All done
exit 0
 
Old 12-31-2008, 10:32 AM   #6
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15;
Posts: 440

Rep: Reputation: 46
Though it is somewhat more complicated to configure, I have found that bacula (www.bacula.org)
is a very comprehensive backup solution. You can not only backup linux machine, but also those running windows.
 
Old 12-31-2008, 11:07 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Rsync to sync the two computers together.



for a simple backup check out flyback or timevault
( based on Apple OS X Time Machine, using standard Linux utilities )

http://code.google.com/p/flyback/

https://wiki.ubuntu.com/TimeVault
 
Old 12-31-2008, 12:18 PM   #8
enyawix
Member
 
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 409

Rep: Reputation: 32
what is wrong with a simple script and tar? why are you guys making things complicated?
 
Old 01-01-2009, 12:21 AM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by enyawix View Post
what is wrong with a simple script and tar? why are you guys making things complicated?
The OP said "...mirrors my data hdd with another hdd every night". rsync is much better than tar for that. Nothing wrong with tar for backups - that's what I use (see my simple script above) - but for the stated use, rsync is better.
 
Old 01-01-2009, 04:52 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A mirrored drive isn't a backup. If you delete a file you didn't want to and the drive is mirrored, you can't recover it. It will protect you against the first drive going bad however.

If you want to mirror a drive, you could create a raid 1 array.

Look at the tar info manual. You can use it to mass duplicate the files on one partition to another.
Code:
4.6 Notable `tar' Usages
========================

     _(This message will disappear, once this node revised.)_

You can easily use archive files to transport a group of files from one
system to another: put all relevant files into an archive on one
computer system, transfer the archive to another system, and extract
the contents there.  The basic transfer medium might be magnetic tape,
Internet FTP, or even electronic mail (though you must encode the
archive with `uuencode' in order to transport it properly by mail).
Both machines do not have to use the same operating system, as long as
they both support the `tar' program.

   For example, here is how you might copy a directory's contents from
one disk to another, while preserving the dates, modes, owners and
link-structure of all the files therein.  In this case, the transfer
medium is a "pipe", which is one a Unix redirection mechanism:

     $ (cd sourcedir; tar -cf - .) | (cd targetdir; tar -xf -)

You can avoid subshells by using `-C' option:

     $ tar -C sourcedir -cf - . | tar -C targetdir -xf -

The command also works using short option forms:

     $ (cd sourcedir; tar --create --file=- . ) \
            | (cd targetdir; tar --extract --file=-)
     # Or:
     $ tar --directory sourcedir --create --file=- . ) \
            | tar --directory targetdir --extract --file=-

This is one of the easiest methods to transfer a `tar' archive.
You could use this to mirror files. The target directory could be on another computer anywhere on the Internet if you use ssh.

You could use the -g (--listed-incremental) to only copy new files for subsequent backups. Suppose you want to also create traditional tar backups. You can insert "| tee /backup/location/${date}.tar |" in the middle to be able to A) replicate new files on another computer or filesystem and B) create backup files on an external drive or nas drive.
[code]

You can also configure ssh to use public key authentication, so the target filesystem on the right hand side of the pipe could be on a computer anywhere on the internet.
A simple example:
Code:
tar -cf - bin/ | tee bin.tar | ssh hpmedia tar -xvf - -C Downloads/ >bin_tar_log
Note, that in this example, the redirection occurs before the first tar command and will be located on the local host and not the remote side.

Rsync can also be configured to use ssh as well.

If you want to make secure backups, the easiest way would be to backup to an external drive with an encrypted filesystem.
 
Old 01-01-2009, 08:35 AM   #11
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
I have hardware RAID1 (mirroring) set up between two 750 GB HDs. I am using a cheap HighPoint RAID card, which works well enough. This is all to protect me from hardware failure, as far as everything else. I keep my important (information that might need to be backed up) together in just a few folders on my desktop and I just copy them to either another HD on my machine or an external. When I copy to an external or write files to a CD, I always encrypt everything for the protection of my information. I wouldn't worry about all this other stuff people are recommending, I would just go buy an big USB external HD from NewEgg or the like, and just straight up copy your important stuff. This will allow very quick retreival in the event of a loss of data.

- Jim
 
Old 01-01-2009, 09:25 AM   #12
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15;
Posts: 440

Rep: Reputation: 46
I guess the question really comes down to the reason you want the backup, and the degree to which you deem it invaluable. Tar and rsync are wonderful copying solutions. They are rapid, as easy to use. There is no question that is an important consideration. Raid is an excellent hardware solution which allows you to double (or even more) the number of disks containing a given piece of information. Unfortunately you increase the number of disks in play at any given time, and the cost doubles of increases for each disk. Perhaps the cost is irrelevant. According to experts who have actually examined the reliability and success of restoration of data, the old utility 'dump' is the best way to insure the viability of the backup. Tar is nice, but a single extraneous bit can render the tar file unusable. Cpio is better, but the top of the heap is dump.

I happen to like bacula beause of the ability to support all platforms, and restore data properly to them.
 
Old 01-07-2009, 04:02 PM   #13
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Original Poster
Rep: Reputation: 15
Thanks guys. Rsync sounds perfect.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux backup software and drive mirroring software csross Linux - Software 1 12-26-2007 06:59 PM
Backup software for linux?? westman Linux - Software 13 03-31-2006 04:16 PM
is there any backup software for linux raymondm Linux - Newbie 3 04-22-2003 03:24 PM
Linux backup-to-CD software? neitzke Linux - Software 1 02-06-2003 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration