Tools for live cloning and updating of (classroom) computers. Similar to Snapper, but with restore-on-boot and some tools to distribute the snapshots to multiple workstations.
Just copy the executable to /usr/local/bin. If you want restore-on-boot, also make sure it is included in the initial ramdisk.
# install friclone
cp friclone /usr/local/bin
# enable restore-on-boot
cp friclone /etc/initramfs-tools/scripts/local-premount/friclone-initrd
update-initramfs
#
friclone enroll / 01-root
# if /home/user is on a separate subvolume
friclone enroll /home/user 02-userhome
# for some reason, ubuntu has these as separate subvolumes
friclone enroll /var/lib/portables 03-portables
friclone enroll /var/lib/machines 04-machines
friclone snapshot /
friclone list /
friclone switchto / 2026-01-01T12:13:24+00:00
friclone name / 2026-01-01T12:13:24+00:00 stable
On prototype:
friclone snapshot /
On server:
friclone-pull / [email protected] sudo
friclone receive / file:///path/to/snapshots remember
After this works once, you can just use:
friclone receive /
When you want to switch to the newly received snapshot, use something like:
friclone name / 2026-01-01T12:13:24+00:00 latest
friclone switchto / latest
The software in this repository is used at the Faculty of Computer and Information Science and is actively tested in our environment. We use Debian or Ubuntu.
Most of the heavy lifting (snapshot and restore) is done by a single POSIX shell script. This script must work in BusyBox inside the initial ram disk. The transfer of snapshots from a prototype computer to a server and from the server to clients is done by a separate posix shell script. The software should therefore work with most distributions.
Patches to make the software work with other distributions are welcome.
The script requires btrfs-tools and a posix shell. If snapshots are stored on a webserver, the wget command should be available. The wget in busybox is sufficient. Currently, the software only supports BTRFS.