Questions about off site backups

I have been studying a backup program to completely backup my linode from off site, to a hard drive on my home computer. RSnapshot seems to be a very good tool. http://rsnapshot.org/

I am trying to understand what directories off my root that I need to backup. I have heard that sys and dev should never be backed up. A trial run seemed to show a lot of errors in the log, especially from attempting to include /sys

If they are not backed up, and I restore all the other directories to an empty disk image, in the future, will those directories be able to rebuild themselves? Will I have to create empty /sys and /dev directories prior to booting the disk image? Any other directories below I should definately not include in my backup snapshots?

I will be doing the backup off a running system. My goal is to use the backed up files to restore, and get a machine running, exactly as it looked on the backup date, should the need arise, with minimal fuss.

My root directories are below- I'd be interested in any comments or caveats. I'm using Ubuntu 9.10

bin boot dev etc home lib lost+found media mnt opt proc root sbin selinux srv sys tmp usr var

7 Replies

sys and dev should be automatically recreated on the image when you boot it up before restoring it. But two additional directories you can exclude is /proc and /tmp

@Schultz:

sys and dev should be automatically recreated on the image when you boot it up before restoring it. But two additional directories you can exclude is /proc and /tmp

just so I understand- if I restore, all the directories to a completely blank disk image (with the exception of /proc /tmp /dev and /sys), the system will boot ok?

I don't have to create (empty) /proc /tmp /sys and /dev folders prior to booting?

The reason I ask, is the last time I tried to do this, I could not get linode to boot from my restore- I think I had not restored /sys and /dev , but perhaps there were other reasons why the restored system would not boot.

Thanks for the response

You do not need to restore /dev, but you will nead to re-populate it using MAKDEV (unless you are using udev, me thinks). Something like:

cd /restore/dev
MAKEDEV std

@saman007uk:

You do not need to restore /dev, but you will nead to re-populate it using MAKDEV (unless you are using udev, me thinks). Something like:

cd /restore/dev
MAKEDEV std

Ok, that makes sense. I guess I'd run it from finnix, which I'd be booted into anyway performing the restore.

Can anyone confirm if ubuntu 9.10 uses udev, and, if so, will it completely create a totally absent /dev directory upon boot?

I'm guessing nothing special needs to be done for the /sys /proc and /tmp

i just did a quick test with Ubuntu 9.10 vm. You will need to create dev, sys, proc empty directories for it to boot. Or else you will get kernel panics. So if you have a script to restore just have empty directories created.

@Schultz:

i just did a quick test with Ubuntu 9.10 vm. You will need to create dev, sys, proc empty directories for it to boot. Or else you will get kernel panics. So if you have a script to restore just have empty directories created.

Great info to know! Thanks so much! Did you have to run makedev, or were the contents of /dev automatically populated on boot?

Ubuntu uses udev so you don't have to use makedev with it. It automatically re-creates them.

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