D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Backup in Linux

 

On 27/04/14 22:34, bad apple wrote:
On 27/04/14 20:10, Julian Hall wrote:
Hi All,

I've been trying different GUI based programs for backup and had most
luck with 'luckyBackup', however it's not /that/ lucky because no matter
what Exclusions I give it, it keeps trying to add the content of drives
that are currently mounted when I've told it to exclude them. I had a go
with dd tonight but got this error after a few minutes:

sudo dd if=/dev/sda8 of=/media/julian/ARTEMIS/systembackup.img
dd: reading ‘/dev/sda8’: Input/output error
17130448+0 records in
17130448+0 records out
8770789376 bytes (8.8 GB) copied, 257.292 s, 34.1 MB/s

/dev/sda8 is the root of my Mint installation, ARTEMIS is a USB external
HD.

Should I try 'luckyBackup' again but with other drives unmounted?

Kind regards,

Julian


Let me guess: where are you running the dd command *from*? Would you be
running it from within the Mint system that is actually installed on
/dev/sda8 by any chance? I bet you are...
Doh... guilty as charged! I do have a Mint 16 CD so would you advise running that and doing the backup from there, or will Gordon's advice work on the running system?
Don't run dd on an active partition - in fact, you shouldn't run dd on a
partition that is even mounted at all (as a source - if you're dumping
to an image file obviously the *target* filesystem has to be mounted and
writable). This absolutely precludes trying to run dd from within a
linux system to clone it's active root partition - that is a recipe for
disaster. To clone your Mint partition with dd, you would need to boot
from another linux system (anything except /dev/sda8) on your computer,
which could and quite probably should be a live bootable media. dd will
otherwise fail when it hits any of the parts of your active root
partition that will cause even a root level filesystem read fail
(/dev/pts, /dev/shm, the .gvfs directory in your home folder, etc).

If I guessed wrong and you weren't running this from inside your Mint
install, then pay attention to Gordon's reply: it's probably not as
drastic as he initially suggests (could just be simple minor filesystem
corruption or a random glitch, it definitely doesn't mean your physical
disk is about to die necessarily) but it is definitely urgently in need
of attention. His rsync advice is sensible, and is indeed what I
normally use to keep simple, incremental backups of my stuff. Fancy
backup GUIs aren't really very trustworthy in my opinion, they hide too
much detail: learn good old fashioned rsync properly and then take a
look at the already recommended and thoroughly excellent backuppc and
bacula tools.

But I suspect it's highly likely that you're just trying to dd your own
root drive. Don't do that :]
You know me so well... :) *looks around* Where /is/ that drawing board? I need to get back to it...

Julian

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq