DEV Community

Cover image for Which Linux directories to backup for bare metal recovery
jdrch
jdrch

Posted on

Which Linux directories to backup for bare metal recovery

This post pertains mostly to Debian(10 and distributions based on it) and Raspberry Pi OS, but can most likely be extended to other distributions.

For Debian, backup everything except the following:

/proc/*
/sys/*
/dev/*
/run/*
/etc/mtab
/var/cache/apt/archives/*.deb
lost+found/*
/tmp/*
/var/tmp/*
/var/backups/*
.Private
/mnt/*
Enter fullscreen mode Exit fullscreen mode

For Raspberry Pi OS, backup everything except the following:

/proc/*
/sys/*
/dev/*
/run/*
/etc/mtab
/var/cache/apt/archives/*.deb
lost+found/*
/tmp/*
/var/tmp/*
/var/backups/*
/mnt/*
/media/*
/svr/*
Enter fullscreen mode Exit fullscreen mode

Top comments (0)