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?
1 Answer
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.
-
-
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.– VladimirJul 7, 2014 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... Jul 7, 2014 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. :)– VladimirJul 7, 2014 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. Jul 7, 2014 at 15:05
mknod
maybe, with udev I see no particular reason, no.