You are not logged in.

#1 2014-07-04 23:34:03

Moviuro
Member
Registered: 2012-06-03
Posts: 73

directories to snapshot to have efficient and working rollback

Hi all!

I already have in place some services to snapshot my system (/ without /var and /home) and /home on a regular basis. However, I don't know which folders must absolutely be kept so that the rollback is effective, efficient and reliable (e.g. no broken pacman DB).
is there somewhere a list of directories that must be kept as to not break everything? Also, which folders are expendable (like /var/cache/pacman/pkg, for which I use pkgcacheclean)? (I like the idea of snapshots but don't want to end up choking on disk space because I snapshot-ted some (potentially) useless data.)

That's it. For curious people, my service:

% cat /etc/systemd/system/snap@.service
[Unit]
Description=Take snapshot of the %f subvolume

[Service]
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
Type=oneshot
# Ugly for now
ExecStart=/usr/bin/sh -c 'btrfs subvolume snapshot -r %f /mnt/backup/root%f/`date --iso-8601`'

Use snap@-.service for "/" and snap@home.service for "/home"

% ls /mnt/backup/root
home -> ../home

bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

Board footer

Powered by FluxBB