Recommendations for Backup Content for PCs Run Under Linux and macOS

If you are using macOS or Linux as an operating system on your computer and you not familiar with the OS structure, you may be curious about what is needed to be backed up beside your data files.

This article is a short guideline explaining the locations of system components that are likely to be backed up.

Basic Recommendations

It is recommended to back up the contents of the following directories:

Location Description Applies To
/home User files macOS and Linux
/etc Daemon configuration files macOS and Linux
/var Only the subdirectories that contain user data are needed, e.g. /var/mail, /var/mysql, /var/www macOS and Linux

In some cases, you may need need to back up the following data:

Location Description Applies To
/media or /mnt In case there is a mount point containing some valuable data macOS and Linux
/root In case there is any important information or settings in the home directory for the root user macOS and Linux

It is not recommended to include in a backup plan the following directories:

Location Description Applies To
/boot Boot loader files, e.g., kernels, initrd macOS and Linux
/dev Device files, e.g., /dev/null, /dev/disk0, /dev/sda1, /dev/tty, /dev/random macOS and Linux
/var/run Run-time variable data. This directory contains system information data describing the system since it was booted macOS and Linux
/tmp Temporary files (see also /var/tmp) macOS and Linux
/sys Contains information about devices, drivers, and some kernel features macOS and Linux
/Applications Application files macOS only
/Library Program libraries macOS only

To learn more about file system hierarchy, refer to the Filesystem Hierarchy Standard Wikipedia article

https://git.cloudberrylab.com/egor.m/doc-help-kb.git