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

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay