LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-05-2010, 08:13 PM   #1
dsmyth
LQ Newbie
 
Registered: Mar 2010
Location: Glasgow, Scotland
Distribution: Fedora 12
Posts: 26
Blog Entries: 6

Rep: Reputation: 17
Backup with Rsync or Dump or dd.


Hi, this question has kind of been asked before but I'd really just like to run my idea/thoughts past someone with more experience encase I'm missing something obvious.

It's about creating a complete backup of my machine.

What I want to do is completely backup my whole computer, everything!, because I've got it just right. If something were to go wrong then I want to restore right back to the way the system is right now (from a rescue disk).

I know that using dd to do a byte level backup would be best but I read that it's not all that great for restoring the system (HDD's sizes must be the same).

Rsync looks favourite but can it copy the root directory... i.e. "rsync -a / /media/backup/" and all the partitions. I just not sure whether it can do the whole computer .

Dump is another tool but it seems to have dependencies to tool versions. And again I don't know if it will do the whole system and how easy it is to restore.

Any advice or tips?

*EDIT*
It is OK I have found a solution. There is a tool called FSArchiver that looks to do what I want and it comes part of SystemRescueCd (a bootable CD used to fix computers). It turns out that the backup I'm looking to do is at the file system level where the tools above are really file level backups. We live and learn.

Last edited by dsmyth; 03-06-2010 at 06:01 AM.
 
Old 03-06-2010, 01:11 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
If you don't perform an image backup, don't backup the /proc, /sys, /dev or /tmp partitions. The first two are psuedo filesystems. /dev is created when you boot, and backing up /tmp would be a waste of time. You can also use tar, which is what dump would use.

Quote:
HDD's sizes must be the same
Yes, if you restore the image. You could however create your partitions on a new drive, and then mount the partitions that exists in the image backup. Now you can simply copy them to the new hard drive.

Run "fdisk -lu" to print out the starting points of each partition on your system. You can use the offsets with losetup to attach a loop device at that offset. A hard copy printout of the "fdisk -lu" results will make this process easy.

sudo /sbin/losetup -fs -o $((512*<offset>))
sudo mount -t <filesystem> /dev/loop# /mnt

Where offset is the block offset to the start of the partition. loop# is the loop device, such as /dev/loop0, which the losetup command returns.

Last edited by jschiwal; 03-06-2010 at 04:23 PM.
 
1 members found this post helpful.
Old 03-07-2010, 05:23 PM   #3
dsmyth
LQ Newbie
 
Registered: Mar 2010
Location: Glasgow, Scotland
Distribution: Fedora 12
Posts: 26
Blog Entries: 6

Original Poster
Rep: Reputation: 17
Hi, thanks for taking the time to reply jschiwal. Very helpful.

I'm not really sure now the best way forward as there are many options available. Someone posted about something called Clonezilla as well which seems like another option. Clone the system onto another drive.

I've used the offset and loop before to try and mount a virtual hard drive so I know what your suggesting there. I like the idea of doing the low level copy that dd provides. Least I know now that the same size drive 'problem' isn't so much of a problem after all (as long as the offsets are recorded).

Yes thanks for this, have to think more on it. Weight up the options.
 
Old 03-07-2010, 06:00 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,355

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Mmmm - I detest dd as a backup tool. Doesn't tell you when it runs into errors. Use a tool that understands filesystems, and allows you to restore to a different filesystem if wanted.
I'm going to look at fsarchive today - amongst other things offers does integrity checking (file level).
 
Old 03-07-2010, 11:14 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,355

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Worked as advertised. I compressed a test SLES11 system to about 40% - took a while, but was on the same physical disk (different partition); lots of I/O interference I guess.
I then wrote 2k of /dev/urandom over the partition to ensure the filesystem was trashed. Grub error 17 on reboot - what a surprise. Restore was much quicker, and the reboot worked fine. Lilo would probably be more of a problem, but a chroot and rerunning lilo would probably suffice.
 
1 members found this post helpful.
Old 03-09-2010, 05:18 PM   #6
dsmyth
LQ Newbie
 
Registered: Mar 2010
Location: Glasgow, Scotland
Distribution: Fedora 12
Posts: 26
Blog Entries: 6

Original Poster
Rep: Reputation: 17
Wow, thanks syg00... you have no idea how much I appreciate that. thank you...

Going to go with it, liked the idea of the rescue disk and the fact it restores backup to different size disks.
Need to find enough external storage to backup onto now.

Thanks everyone for contributing I've got a way forward now.
 
  


Reply


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
Stack dump during rsync -e ssh ... heavy load! holst Linux - Software 1 09-27-2007 06:41 PM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
Using rsync to backup data. Best way to backup folders? Micro420 Linux - General 2 11-23-2006 01:13 AM
rsync or dump leupi Linux - Software 1 01-20-2006 02:20 PM
rsync error AND/OR dump question Sinope Linux - General 4 08-26-2004 05:57 PM


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