Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Linux Backups: Do I backup /dev?

Name: Anonymous 2006-07-27 0:53

When doing a complete backup of your system, I know you should ignore /proc, /lost+found, and /tmp.  I thought /dev was a virtual filesystem like /proc.  Should I backup /dev, and can I use tar for this (will tar do stupid things like copy my whole hd when it hits /dev/hda and stuff?)

I'm not trying to do a image backup, but be able to recover to near-exact state after reinstalling operating system if it's needed.

Name: Anonymous 2006-07-27 1:17

Hahaha. :'D

No. But you're invited to try!

Name: Anonymous 2006-07-27 6:44

>>1
/dev is a virtual filesystem. udev dynamically creates nodes for system devices. You could back it up with tar, but it'd be pointless, since they get created at each boot.

Observe:

$ stat /dev/null
  File: `/dev/null'
  Size: 0               Blocks: 0          IO Block: 4096   character special file
Device: ch/12d  Inode: 1177        Links: 1     Device type: 1,3

$ stat /dev/sda
  File: `/dev/sda'
  Size: 0               Blocks: 0          IO Block: 4096   block special file
Device: ch/12d  Inode: 4204        Links: 1     Device type: 8,0

The files don't actually exist on your disk; they're in memory.

$ mount
udev on /dev type tmpfs (rw,nosuid)

On another note, you should also ignore /sys, since it's based on the same principle.

For more background: http://en.wikipedia.org/wiki/Device_file

This has been Roseanne, your guide to the world of facts.

Name: Anonymous 2006-07-27 19:40

>>2, >>3
Cool, thank you very much for the information!

Don't change these.
Name: Email:
Entire Thread Thread List