Partition backup using DD

Associate
Joined
5 Jan 2003
Posts
757
Location
Norfolk
Hi,
Just a quicky, I'm going to make a backup of my existing debian system using dd to an external USB drive. I'm planning on keeping the OS booted during the process.

I'm not too familiar with DD but will is cope with the OS still running?
If it wont does anyone know of any alternatives :)

I really don't want to have boot into a live disk and do it that way...
Cheers.
 
It could do it.. but I wouldnt advise it if you want to be 100% risk free. Best idea is to just use a Ubuntu LiveCD. And be careful that you only write to a file.
 
Why do you want to back up while the OS is running? It can be done but some caveats apply.

DD is slow and wasteful. It copies everything, including free space.

Partimage is a better alternative. It only copies used space and can compress the image. Partition to be backed up must not be mounted, though. ( IIRC )


I'd use Partimage but I have full disk encryption and unmounted partitions appear as gibberish to Partimage. So I use the old school method, Tar.

Code:
mount -o ro /dev/sda1 /mnt/sda1 
cd /mnt/sda1

tar -cvjp --numeric-owner --file=/mnt/sda7/backups/1-sda1.tbz .
# --create
# --verbose
# --bzip2
# --preserve-permissions
 
doh :(
I just wanted to save faffing with the box, as it has no keyboard/mouse or monitor and it's in a fiddly position :(
I log in mainly though SSH to do anything that needs attention.

I backup individual directories on a cron, so the most important stuff is safe, although admittedly I forgot to backup the whole OS initially :o

I'll have a look at partimage in more detail :)
A quick look and it looks ideal. Thanks :D

System backup is always something I've overlooked.... :eek:
Cheers.

PS:
Its a PPC MiniMac running debian and I've also noticed it's a bit hit and miss (mostly miss), when booting from a CD....
 
Last edited:
Cheers to everyones suggestions, I ended up just going the tar route. :D

I also found out that my cron backing up important stuff wan't zipping up the tar :eek: :o
 
Back
Top Bottom