I'm curious why in all backup tutorials I found tar command excludes among others /dev/pts
and not all of /dev/
Why would I want to backup anything under dev?
Asked
Active
Viewed 429 times
4

Lord_JABA
- 161
- 2
-
2back in the day when you still had to create device entries manually with `mknod` maybe, with udev I see no particular reason, no. – HBruijn Jul 07 '14 at 12:27
1 Answers
6
There is generally no need to backup anything under dev, since it's mostly generated upon boot by udev. I did a lot of OS migrations by simply rsyncing everything except stuff like proc, dev, sys etc.
Just make sure when you setup your backups, ALWAYS test a recovery, to see if everything is functioning properly.

Vladimir
- 321
- 1
- 12
-
-
You mean to check the integrity of backed up files? There's probably more than one way to do it, but I was actually referring to something else. Since you're doing full server backups, I suggest you try to restore the server backup on a different machine, to make sure it actually boots, and that everything is OK. – Vladimir Jul 07 '14 at 13:51
-
Good suggestion but somehow missing the point because this backup will (i hope not) be restored on the same machine it's being created. So to test it in "battle conditions" I would need to wreck my production server... – Lord_JABA Jul 07 '14 at 13:54
-
Of course you wouldn't test it on your actual production machine, but try to restore it on a similar machine, or a VM. Make sure you run the grub installation if restoring to new hard drives. :) – Vladimir Jul 07 '14 at 14:04
-
4Note that *udev* is Linux specific. On other unixoid systems with a static `/dev`, it is indeed advisable to include it in the backup, and only exclude `/dev/pts`, which is dynamically managed even there. – Simon Richter Jul 07 '14 at 15:05