LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-16-2009, 07:51 PM   #1
Ducttapemasterj
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: 0
Advice on backup


I am not completely certain I am posting this in the right forum, but here goes:
I am managing IT for a very small company, and we run a few servers, and back them up onto a spare computer using BackupPC. What I would like to do is find a relatively simple, yet reliable way to back that up onto a USB harddrive so we can take all the data offsite in case of fire or similar disaster. I've been trying to decifer the documentation on BackupPC to use their archive functionality, but am having difficulty getting it to work properly. I am also learning more about using logical volume management and have come across LVM's little snapshot tool. Anyway my question is, what are the advantages/disadvantages between using BackupPC's archive function and usign LVM's snapshot tool. It looks to me like LVM's snapshot would be much easier because it would be fast, reliable, and I could simply upload that snapshot onto a new computer if anything were to happen to the current one. Is this an accurate assessment or am I missing something?
Any thoughts or advice on this would be greatly appreciated.
 
Old 01-17-2009, 08:26 AM   #2
georgekraj
LQ Newbie
 
Registered: Dec 2007
Location: India
Distribution: RHEL 5.0
Posts: 27

Rep: Reputation: 16
Keep in mind that you can use LVM snapshot feature only if you have LVM partitions. For non-LVM partitions I would suggest you to use RSYNC software.

LVM Guide
http://www.howtoforge.com/linux_lvm_snapshots

RSync Guide
http://www.mikerubel.org/computers/rsync_snapshots/
 
Old 01-17-2009, 08:56 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
It also depends on what the servers do. If it is a MySQL database, then either an LVM snapshot or a dump will backup the database.
Some filesystems like xfs have dump utilities.

Another thing to consider is whether your backup program will also archive all of the permissions, attributes, extended attributes and security attributes. If you sync files to another computer, make sure that the filesystem on the destination will preserve these attributes.

Suppose that you have a lightning strike and the UPS doesn't protect you. This could happen through any connection to the computer, not just power. What happens if this blows out (literally) your drives and the mirror. Backing up, or making a copy of an online archive and keeping it in a safe place (like a fireproof container; or pun intended a safe) would be a good idea. Perhaps this would contain just the data that is valuable for your business, while an online backups contain everything on the servers.

Here is a usage of tar, that I played with to simultaneously archive a directory and sync it to another computer at the same time.
tar -C /basedirectory -g backup.snar -cf - /dir1 /dir2 /dir3 | tee /mnt/backupusb/"$DATE".tar | ssh user@remote tar -C /directory -xpvf - >/path/to/backup-"$DATE".log

I use public key authentication, and use ssh-agent to unlock my private key, so I didn't have a passphrase prompt interfere. The -g option produces a timestamp file so the next time you run it, only changed files are archived & synced.

There are many more options to check with tar, such as listing directories to skip.

---
One last suggestion. A backup program I like is kdar. It is a front end to dar (note: the kdar may not be supported anymore). Dar stands for disk archive and is designed for producing cd or dvd sized slices, rather than tar (Tape ARchive) which is designed to use a tape device. Anyway, using the GUI kdar program to configure a main backup job and an incremental job, you can export the job as a bash script using the dar command. This could then be used for a cron job. After that you don't need kdar anymore.

If you find similar GUI backup program, see if it can export a script that will perform the archive. This makes it a lot easier getting the numerous options, and directories to omit (like /proc, /dev/, /tmp) correct in a script.

Last edited by jschiwal; 01-17-2009 at 09:04 AM.
 
  


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
backup and partition advice jukebox55 Linux - Newbie 3 03-19-2008 09:07 AM
Need Backup Advice ictoan General 3 02-26-2008 08:13 AM
Backup Strategy Advice Pete89 Linux - Newbie 9 08-22-2007 09:19 PM
dvd backup advice needed countingbeans24 Linux - Newbie 4 11-15-2004 09:55 PM
Need advice on Backup solution imsam Linux - Enterprise 3 11-06-2004 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:01 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