LinuxQuestions.org
Visit Jeremy's Blog.
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 06-08-2005, 02:35 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Post Tar and partimage backup strategy


I've been using Linux for a while now, and basically have everything set up the way I want it to be. It's taken months to get to this point, and I'd like to backup my system so I can at least restore everything to how it is at this point if something were to happen. There are two things I'd like to accomplish.

First, I want to make an image of everything on this system so I can start with a blank drive and still restore the image. I don't have room to save it on this drive so I plan to directly connect it to another computer with spare room on a FAT partition and use partimage to save each partition and the partition table there. I think I've figured this part out, but if anyone has any advice or reasons why this isn't a good idea, let me know.

Second, I'd like to have a shell script that I can run periodically (or automate with cron) that will create a compressed tar archive of my most important files that I can burn to a CD or save to another drive. I'd like to save everything in my home directory except for ~/music, which contains already-compressed .ogg's that I have on CD anyway and don't need to back up. I also assume a copy of everything in /etc would be good to include. Apart from making a giant tar archive with the whole system (which I don't need to do since I'm doing that with partimage), what else would be important to put on these periodic backups? Also, how does tar treat permissions? If I make the archive as root and then, as root, cd / and tar zxvf backup.tgz, will everything be restored to where it was with the same ownership and permissions as they were before? If not, what backup tool will do that? Finally, if someone could type up a shell script that would do this (save the above directories to backupMMDDYY.tgz, for example), that would be great.

Thanks in advance.
 
Old 06-08-2005, 07:50 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Let's take the issue of partimage first. The only drawback I am aware of is this: The partition the image is restored must be the same size as the partition the image was make from. Which means, after making the image, DON'T change the size of the partition, or you probably won't be able to restore it.

Tar makes a monolithic file (one large file). If any part of it is corrupted, you risk loosing all of it.

I searched for four years (igoring one particular app in the process) until I found the one which would do what I wanted to do (the one I was ignoring). I refer to DAR . It's a set of bash scripts which you can modify to suit your situation, make full or incremental backups, full or partial restores, etc. Each file is compressed individually. If one is corrupt, you risk only one. Dar has a skip-ahead feature, so that a corrupt file can be restored in part, and the rest re-created (in the case of text and data files).

Permissions are preserved. The one drawback I'm aware of is that DAR doesn't restore file creation times. It will restore the file, but use the restoration time as the file creation time. I haven't check recently. That bug may have been repaired.

Oh! Forgot to mention. Dar doesn't care about partition sizes. Backup a small partition; restore to a larger; or vice versa. Not a problem, so long as it will fit into the partition.

Last edited by bigrigdriver; 06-08-2005 at 07:54 PM.
 
  


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 strategy xpucto Linux - Networking 2 11-16-2005 12:19 PM
dd vs. partimage vs. tar? harken Linux - Software 13 02-15-2005 01:52 AM
Building a backup strategy pembo13 Linux - General 16 04-28-2004 01:02 PM
Using partimage with network backup Swift&Smart Linux - Software 2 06-19-2003 11:42 PM
Backup strategy Swift&Smart Linux - General 3 04-17-2003 03:07 AM

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

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