Skip to content

UL-FRI/friclone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 

Repository files navigation

friclone

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.

Installation

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
# 

Usage

Common usage

Add (Enroll) volumes to be snapshotted

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

Create snapshot

friclone snapshot /

List snapshots

friclone list /

Switch to (restore) snapshot (for next boot)

friclone switchto / 2026-01-01T12:13:24+00:00

Freeze system

friclone name / 2026-01-01T12:13:24+00:00 stable

Prototype to server

On prototype:

friclone snapshot /

On server:

friclone-pull / [email protected] sudo

Server to classroom computers

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

Development

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.

Dependencies

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.

About

Live cloning and updating of (classroom) computers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages