62
submitted 6 days ago by tubbadu@lemmy.kde.social to c/linux@lemmy.ml

Hello there! Here's the thing: I got some old HDD for my Debian home server, and now that I have plenty of disk space I want to keep a backup of the OS, so that if something accidentally breaks (either SW or HW) I can quickly fix it.

now the question is: which directory should I include and which should I exclude from the backup? I use docker a lot, is there any docker-specific directory that I should back up?

you are viewing a single comment's thread
view the rest of the comments
[-] CocaineShrimp@sh.itjust.works 16 points 6 days ago

I usually only keep documents and media. Programs can be redownloaded and reinstalled (and it might be better to reinstall them in case you move to a new OS anyway to ensure compatibility).

For docker specifically, only keep stuff that's specific for your instance; which you normally setup as an external volume anyway. Docker is designed such that you should be able to nuke the container, and all persistent data is restored via an external volume on the host. If you're not doing that, you should immediately go and set that up now (to get the data out safely, setup a volume connection such that the container path is new - that way you don't accidentally destroy what's there, copy the stuff you need out, then readjust the path so it's correct)

[-] tubbadu@lemmy.kde.social 1 points 6 days ago* (last edited 6 days ago)

thanks for the reply! Yes for sure I'm backing up all the /home directory, but I'd like to preserve also important configurations like ssh, cronjob etc, but I don't really know which directories are important for this and which are not

[-] non_burglar@lemmy.world 1 points 5 days ago

You've just answered your ow question; back up the /etc directory should cover all those.

this post was submitted on 16 Jul 2025
62 points (98.4% liked)

Linux

56576 readers
390 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS