Backing up "hard drive"

I want to pull down a complete copy of my linode's hard drive image, because I have to temporarily close out my account. But when I get around to getting a linode again, I want to be able to go right back where I was (i.e., not having to remimber and reconfigure everything again).

What's the best solution for this?

7 Replies

To avoid remembering and reconfiguring, respectively, you could back up the list of installed packages as well as the /etc directory.

And of course the home folder, any email stored on the machine, and so on.

I was actually thinking of backing up the whole filesystem. I'm trying to figure out the easiest/safest way to do that.

Perferably I'd like to back up to a "compressed image" on my home hard drive.

In that case, you could do something like:

ssh root@yourlinode "tar cvfj - /" > backup.tar.bz2

The tricky part will be restoring. You'll probably need to set up a Debian partition (because it's the smallest), then use that to restore the tarball to your main drive.

Oh, and make sure to use the "-p" flag when you restore, otherwise the permissions will be funky.

@autodmc:

I was actually thinking of backing up the whole filesystem. I'm trying to figure out the easiest/safest way to do that.

Perferably I'd like to back up to a "compressed image" on my home hard drive.

Assuming you've got a Linux box at home / elsewhere able to receive a SSH connection from your Linode, you can try this:

$ ssh USER@hostXX.linode.com
(login)
$ sudo dump -0uf - /dev/ubda | gzip -2 | \
 ssh USER@HOMEMACHINE dd of=<somedir>/linode-udba-0.dump.gz</somedir> 

This example uses dump(1), but you can use a different archive tool if you prefer.

HTH,

Cliff

I'd make sure your drive is read only first. Boot from Finnix and tell linode to make your normal drive ubdb. Then run:

dd if=/dev/ubdb | ssh your.pc.ip.addy dd of=/path/to/disk.img

You can add compression and stuff if you want, I'll leave that up to you.

The Finnix image also has netcat, which I've used before to copy disk images from one node to another.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct