Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
2  
back 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 7 at 12:27

1 Answer 1

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.

share|improve this answer
    
Can I use some tar option to make it check file after compression? –  Lord_JABA Jul 7 at 13:46
    
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 7 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 7 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 7 at 14:04
4  
Note 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 7 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.