Which system directories to backup in Linux?

in backup •  7 years ago  (edited)

You might consider the following directories when doing your system backup:

/root
• main directory for the root user.

/home
• contains the user’s data files and user-specific configuration files. Each users has one folder with their username. Each user only has write access to their own home folder and must obtain elevated permissions (become the root user) to modify other files on the system.

/etc
• contains system-wide configuration files, not contain user-specific configuration files (normally located in each user’s home directory).

/usr/local/
• locally compiled applications install to by default (i.e. not installed through apt). If you have packages installed here, you may want to backup the whole directory, so you don't have to reinstall them. If the packages themselves aren't important to you, it should be enough to backup /usr/local/etc/ and /usr/local/src/

/boot
• contains the files needed to boot the system – for example, GRUB boot loader’s files and Linux kernels are stored here. However, the boot loader’s configuration files aren’t located here, though – they’re in /etc with the other configuration files.

If you found I miss out something, please leave your comment below. Cheers

Follow & support @sylviabrowyn :)
bitcoin: 16LU4iUtePmTgNxdHP57GecL4Z64dLtS2b
ethereum: 0x235119b56c2dcb124a3a0e0907b58c3492744caa
gamecredits: GLoB8UqgS1AHCXB9ZRTQnK2WF2R4aLaXDK
litecoin: LYujeNFJ5xL4UvJpSNPWC7XCbEEvGqr1cK
zcash: t1PrZbxeQ2VA3VQUHscN4vnALPb6ihrhpjk
stratis: SfBhJ6irSowwNxeKv64w3zDMNNgaA3Cfgk
dash: XuF69by15R8ZA19euh2UNM2WwUiMpCYF4h
bitcoincash: 1Gd2ohdr9uqQpyeUHdTr6gVmfzSD2brx7y

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Well, if you're restoring the files after a re-install you shouldn't restore the /boot directory. About the /etc directory I'd manually restore just specific files...

Thanks for your time to comment on this, I include the /boot directory because some users with dual boot may need it. I agree that some files in /etc directory are unnecessary but it'd be difficulty for inexperienced users (including me) to select them one-by-one, so to save more time I'd just save & restore the whole directory. Please share your opinion here if you have one :)

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained/