Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am looking to do a very simple full backup of my Debian box to DVD, to be able to restore if/when I screw something up. I am planning a full backup performed in separate volumes by top level directory (/home, /usr, /var, etc.). Not just /home and /etc because reinstalling and reconfiguring is a major pain.
Is there a well crafted 'tar' command with options that will do the following things?:
1. retain long names and directory structure/relationship,
2. retain the file permissions/ownerships and dates
3. backup the symlinks
4. limit each output file size to reasonable size (via spanning) (1 GB each, or a max. of 4GB on a DVD)
I know not to try to backup: swap, /proc and /mnt directories, but What about /dev? - How do I backup/restore my list of devices?
What about /tmp? - Do I need any data in there for the next boot after a restore?
You can re-create the devices so you don't need to backup /dev and neither /tmp as it only contains some temporary files and there usually is a cron job deleting that folder each day or week.
I would check 'man tar' to begin with but I do believe you need the atleast the '-p' option to retain permissions, I don't remember rest of tar's options.
So, how do I correctly "remake" the long list of devices in /dev on my box without re-installing or doing it by hand, if they aren't backed up? I wanted to be able to be able to do a complete restore from DVD media by using 'tar', and use some drive utilities for handling boot sector backup and partitioning if those get corrupted.
Will 'tar' even backup the name/links of devices or will it recurse into the "devices" and try to back them up ? -- /dev/zero and /dev/urandom could take a while
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.