guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#46063] [PATCH] WIP snapper fixes and snapperd service


From: raingloom
Subject: [bug#46063] [PATCH] WIP snapper fixes and snapperd service
Date: Sun, 24 Jan 2021 03:13:37 +0100

Hi!

I have a technically working but still only lightly tested and not very
user friendly patch set for making Snapper work!

Included is Pierre Neidhardt's original patch, followed by my patches.

How to try it:
Everything needs sudo for now, sorry about that. This could probably be
changed so that users could administrate configs pertaining only to
their home dirs, but it looks like ading new configs will require sudo
no matter what.

0. Have a BTRFS file system mounted somewhere. You may have heard that
other setups (like ext4 or thin LVM) also works, but based on issue
tracker activity, it looks very much like they don't, or aren't
maintained and can break at any time.

```
# Create new subvolume
btrfs subvolume create
# Attempt to create a new config without understanding what you're
getting into:
sudo snapper -c my-config-name create-config path/to/subvolume
# This will show informative messages like `Failure (error.something).`
# Obviously this is because you haven't populated the relevant parts of
# /etc. Duh. So do this, and think about how fun it must have been to
# track down the sources of these messages.
sudo cp -r $(./pre-inst-env guix build snapper)/etc/snapper /etc/snapper
sudo install -D -m 644 $(./pre-inst-env guix build --source 
snapper)/data/sysconfig.snapper /etc/sysconfig/snapper
# Add snapper-service-type to an operating-system. I assume you know how to do 
it on your own.
# If anything breaks:
sudo herd status snapperd
# It sometimes stops for some reason? Just enable it and restart.
# Anyways, now you can create a configuration. :D
sudo snapper -c my-config-name create-config path/to/subvolume
```

Now just continue trying stuff from one of the many Snapper tutorials
around the net, like the Arch Wiki one.

Yay! Was that unnecessarily hard? It was. That's why this is a WIP
patchset and why I need some tips on making it work better.

* Should snapper be configured to use something other than
  /etc/sysconfig? The sysconfig subdirectory doesn't really make sense
  on Guix, but maybe it's not worth bikeshedding.
* (How) should homes be converted to BTRFS subvolumes?
* Snapshot scheduling is still TODO.
* Should /etc/snapper even be mutable? How to handle the configuration
  data type?

TLDR: I have some ideas on how to proceed, but would welcome some input
from people who have some experience setting up backups and
snapshotting, either on Guix, or Nix, or some traditional distro.

Attachment: 0001-gnu-Add-snapper.patch
Description: Text Data

Attachment: 0002-gnu-WIP-update-Snapper.patch
Description: Text Data

Attachment: 0003-WIP-gnu-services-Added-basics-of-snapper-service.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]