DEV Community

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

Posted on

1 1

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)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay