LinuxQuestions.org
Help answer threads with 0 replies.
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-18-2008, 05:47 PM   #1
Visitek
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Rep: Reputation: 0
Backup / Image of Linux Drive


I am using debian (without x) and I need a script that can be added to cron.weekly which will do a backup to an NTFS formatted drive

Can anyone tell me where I can find one or how to write it

Thanks - much appreciated

Ian
 
Old 01-19-2008, 09:11 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
rsync -a [source] [destination]

There, add all the paths of files you want in [source] and put them where you want them to go in [destination].

Be creative and make it more complex if you want, but don't make others write scripts for a setup/configuration they know nothing about and certainly don't know what files you need backed up.

Your title also mentioned to image a drive, are you wanting to take the whole drive image? If so, use dd but I wouldn't rely on dd as a backup, it's not reliable and there's not need to waste the time and space on a full disk image.
 
Old 01-20-2008, 02:27 PM   #3
Visitek
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Disk Image

Thanks

There, add all the paths of files you want in [source] and put them where you want them to go in [destination].

I found script that used rsync and the essence of it was:
rsync -rlt --delete --exclude=.* --modify-window=1 $backup_dir $backup_mount_point/$backup_target

This works and have tested successfully, however if not dd then what ( for the disk image)?

Your title also mentioned to image a drive, are you wanting to take the whole drive image? If so, use dd but I wouldn't rely on dd as a backup, it's not reliable and there's not need to waste the time and space on a full disk image.

I still would like to do this (I am a bit of a noob still) and replace my existing drive with (effectively a ghost image) copy of it.
 
Old 01-20-2008, 03:09 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,530

Rep: Reputation: 178Reputation: 178
Quote:
Originally Posted by Visitek View Post
I still would like to do this (I am a bit of a noob still) and replace my existing drive with (effectively a ghost image) copy of it.
Using dd to create ghost images is not a good idea for backup and recovery. You can back up and restore filesystems or parts of file systems and get a much stronger backup and recovery system than when you try to backup ghost images. I recommend that you use rsynch for backing up across a network and cp for backing up across drives on the same computer. If you are backing up to tape use tar. If you are backing up to CD or DVD use mkisofs and cdrecord. If you need to compress your backup use tar and bzip2. Compressing your backup saves storage space but it makes recovery more difficult and time consuming.

You can save a lot of computer time by using an update file system. You take a full backup the first time. Then on subsequent backups you only back up files that have changed since the previous backup.

So, like trickykid says people will come up with widely differing backup systems based on their individual needs and equipment available. I suggest that you describe the equipment you have available for backup and recovery and then develop a plan to back up your configuration. Then post the equipment list and plan here and we can help you refine it.

-------------------------------
Steve Stites
 
Old 01-20-2008, 09:41 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
dd is not a backup. I'd say it's best to use dd for moving one image from one location to the next on a case by case basis, nothing more and nothing less, that's all it's good for, ever. If you want to ghost the same image across multiple systems, go buy norton ghost or something just like it.
 
Old 01-28-2008, 06:16 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
...I'd say it's best to use dd for moving one image from one location to the next on a case by case basis, nothing more and nothing less, that's all it's good for, ever....
I don't think AwesomeMachine would agree http://www.linuxquestions.org/questi...ommand-362506/

 
Old 01-28-2008, 10:01 AM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by JZL240I-U View Post
I don't think AwesomeMachine would agree http://www.linuxquestions.org/questi...ommand-362506/

Actually I think he would. I see that post with a bunch of tips and hints to play with imaging, creating image files, etc. But I don't agree with the creation of images for backup purposes. Sure, you can create an image of a drive or partition with dd but it's not a good way to perform regular backups. It's unsafe, unreliable without integrity check that most other solutions will offer, etc. If you want data type backups with an easy way to restore or recover, from a single file or multiple files, dd is not for you and I still stand by my reasoning for not using it as a regular type backup solution.

I've been the primary backup administrator in each of my positions for the past 5 plus years. I've talked to just about every vendor that deals with backup and disaster recovery. I'm sure every admin I know would have a heart attack if they walked into a place that used dd as their primary backup solution, I know I would.

But don't get me wrong, I love dd for all the other reasons and capabilities it has, but it's like RAID, its not a backup solution so don't treat it like one.
 
Old 01-28-2008, 10:10 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
...I see that post with a bunch of tips and hints to play with imaging, creating image files, etc.
Well it is a little bit more than that in my eyes but I don't want to nitpick .

Quote:
Originally Posted by trickykid View Post
But I don't agree with the creation of images for backup purposes. ... I still stand by my reasoning for not using it as a regular type backup solution....But don't get me wrong, I love dd for all the other reasons and capabilities it has, but it's like RAID, its not a backup solution so don't treat it like one.
And here we entirely agree. I don't use if for backups either, I use rsnapshot with fcron but not dd.

dd certainly is a nifty tool for a variety of other purposes, and just for the record, AwesomeMachine did not propose it as backup tool so if I gave that impression that was my error and not his.
 
Old 06-13-2008, 05:01 PM   #9
OracleSmith
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
I am very late to this thread, so I apologize.

I am trying to close all holes in my Linux Disaster Recovery plan. I am quite comfortable with our solution for basic data backups (hot and cold backups of databases, for instance). Also our offsite storage, etc.

In the Unix world, I used sysback to backup the OS and I don't really see an equivalent in the Linux world.

Ideally, I will have a bootable CD-ROM that will let me address a tape backup. Then I can restore an image which essentially lays down my Linux (RedHat) OS. Following this, I can use my backup software to restore databases, files, and so forth.

I am looking at the open source PartImage. I am also considering the Bare Metal tools from Tivoli and NetBackup. I can see where dd might be a good solution here.

Any thoughts for me?
 
Old 06-17-2008, 06:31 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

Rep: Reputation: Disabled
I suggest you open your own thread with a title that conveys yous subject. In this old thread there is little chance that people look in.

For what it is worth (I'm no expert at all): If you use LVM you can make snapshots of your system anytime.
 
Old 06-17-2008, 10:46 AM   #11
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by OracleSmith View Post
I am looking at the open source PartImage. I am also considering the Bare Metal tools from Tivoli and NetBackup. I can see where dd might be a good solution here.

Any thoughts for me?
dd is still not suitable for what you're describing. dd is not a backup tool, it's more of an imaging tool. Bare metal recoveries are where you can reinstall the OS or the base OS and then apply all the data that was there afterwards from backups. In your case and dealing with Oracle and probably other important data, you might want to go commercial like Netbackup or Tivoli, when they have built in tools to verify the data being backed up, something dd does not have. The only way to verify your backups with dd would be to randomly select a dd image you create and restore it to verify, which would be a painstakingly task as an administrator.
 
Old 10-01-2008, 06:31 AM   #12
squeel
LQ Newbie
 
Registered: Apr 2008
Location: Melbourne, Florida
Distribution: Ubuntu 12.04, Fedora 17
Posts: 7

Rep: Reputation: 0
Its free and it works: Mondo Rescue at www.mondorescue.org.

The app can generate ISO images of your system's current configuration enabling you to restore it "exactly" as it is/was at the time of the ISO builds. Any dynamic data (databases etc.) could be lost during the ISO generation but these should be backed up using another process. I have used this app to successfully backup a Centos 5 dedicated Linux box that used LVM for partitioning. The restore to another machine with the same drive configuration was flawless. It even restores the "taskbar" with icons for each user.

I use it for "bare metal" restores so I generate ISO images and write them to a hard drive. Then I move them to a "Windows" box where I will use a Windows app to burn the ISO images. Why???? because while this app can burn directly to your CD/DVD drive it always failed on my hardware configuration. This is not an application problem. It has/had to do with my hardware. Also it generates more then one ISO image for me so burning directly would require that I be awake to shuffle discs in/out of the drive. It supports cron, etc. Spend some time with the documentation first. It does a lot.

Suggestion: make and burn ISO images of your current system (safe). Then restore to ANOTHER LINUX box to be sure that it works for you and that your backup accomplished what you wanted it to do. I would not want to rebuild my current online server and find out that while the app worked the write to disk was flawed or that my backup parameters did not "get everything".

Last edited by squeel; 10-01-2008 at 06:41 AM.
 
  


Reply

Tags
restore


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 into tape drive ? shipon_97 Linux - Newbie 1 10-05-2007 08:01 PM
Hard Drive Image Backup question. eggman95 Linux - General 3 12-09-2006 08:40 AM
looking for a linux image & backup tool / offline / RAID zerobane Linux - Software 2 03-17-2006 02:48 PM
using linux cd to backup xp drive babag Linux - General 2 12-23-2005 08:26 PM
drive image/backup nightmares mattl Linux - General 3 06-21-2004 08:14 PM


All times are GMT -5. The time now is 01:30 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration