Skip to content
spencernortonPublic

About

Encrypted Ubuntu configuration backups with off-site storage and scheduled restore tests.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Timecrate recovery icon

Timecrate

The part of a machine you cannot reinstall, encrypted, signed and off-site — and proof that it restores.
A disaster-recovery backup for Ubuntu that ships configuration, secrets and hand-tuned state to any rclone remote as one small signed archive, and checks on a schedule that the archive really brings a machine back.

Part of NorviOS CI Latest release Install the Ubuntu release package Licence Donate

Review backup status and the kit list, then open retention and backup settings.

The real Timecrate window with synthetic CLI replies. Backup counts, history and remote state are demonstration fixtures; the clip exercises the interface. Recording source and still image.

flowchart LR
    State[Selected files and package manifest] --> Pack[Archive and compress]
    Pack --> Sign[Encrypt and sign]
    Sign --> Remote[(Your rclone remote)]
    Remote --> Verify[Verify signature and decrypt]
    Escrow[Your off-machine recovery keys] --> Verify
    Verify --> Restore[Restore or recovery drill]
Loading

Timecrate backs up the state a package manager cannot recreate. Recovery authenticates a kit before extracting it; the optional desktop window calls the same CLI.

Timecrate does not image a disk. It backs up the slice of a machine that a package manager cannot give back — /etc, your keys and dotfiles, settings, documents, the software under /usr/local — usually a few hundred megabytes, together with a manifest of everything that can be reinstalled. A rebuilt machine gets its packages from the manifest and the rest from the kit.

What it does

One small kit a night. tar over the paths you list, zstd with a long window on every core, then GnuPG: encrypted to your key with AES-256 and signed by a separate key. The kit goes to any rclone remote — Dropbox, Google Drive, B2, S3, SFTP — or to a folder on an attached drive or a mounted share, and, if you want 3-2-1, is mirrored to a second place.

Restores check before they write. Every path that extracts a kit verifies its signature before a single byte lands on disk, so someone with write access to your remote cannot plant an archive that a restore would unpack as root. Restoring a kit older than the newest one recorded needs --force, because an old kit carries a perfectly valid signature.

Recovery needs nothing from this project. A kit opens with gpg, zstd and tar, and the steps are on a printable sheet together with the key (BREAK-GLASS.md). Since 3.1.0 the sheet also downloads as a PDF, and Google Drive is a direct sign-in destination (remote connect --provider drive, with the folder picked in the window).

Post-quantum hybrid kits (3.1.0). With TIMECRATE_CRYPTO=hybrid, each new kit is the ordinary signed GPG kit wrapped in an ML-KEM-1024 envelope (OpenSSL), so breaking RSA-4096 one day still does not open it. Opening a hybrid kit needs both secret keys; both are on the escrow sheet, and classic kits — including every kit already on a remote — stay readable.

It proves itself on a schedule. A monthly drill imports only the escrowed key into an empty keyring and decrypts a real kit from the remote, then authenticates every other kit there. A quarterly capstone rebuilds a machine from a kit inside a real virtual machine — packages, desktop settings, a reboot — where multipass is installed.

It refuses to fail quietly. A kit too big or too small for its size rails is not shipped; a kit missing a manifest the restore needs raises an alert; a remote that lost kits, or went back in time, raises one the same night. timecrate coverage shows what no kit contains. Alerts go to the system journal, and to any command you name.

Retention keeps history. The newest 14 kits, plus the first kit of each of the last 12 months and of each of the last 3 years, per remote.

Install

The signed NorviTech APT archive carries Timecrate in its candidate channel. Use the GitHub release package below for a manual install.

Ubuntu 26.04 — the release packages

Download timecrate_*_all.deb, timecrate-gui_*_all.deb and SHA256SUMS.txt from the latest release, then:

sha256sum --check --ignore-missing SHA256SUMS.txt &&
  sudo apt install ./timecrate_*_all.deb ./timecrate-gui_*_all.deb

timecrate-gui is the optional desktop window; a server needs only timecrate. Installing enables the daily backup, the monthly drill and the quarterly capstone timers, and an upgrade keeps them as they are.

Upgrading a machine that runs the packages from before 3.0.0? Follow MIGRATING.md: the kits already on your remote are read as they are.

Set it up

  1. Say whose machine it is. sudo timecrate config set-user <login> names the account whose home is backed up and whose keys are used; until it is set, the nightly backup has nobody to act for. Then look over /etc/timecrate/include — the default is a starting point, not a survey of your machine. sudo timecrate backup --dry-run shows what a kit would hold, and timecrate coverage what nothing covers.

  2. Choose where the kits go, as that user. One of:

    • a cloud account: timecrate remote connect (Dropbox by default, --provider drive for Google Drive, any other rclone backend by name), then timecrate remote set-path <remote:path>;
    • a remote rclone already knows: timecrate remote list, then set-path <name>:<path>;
    • a folder: timecrate remote set-path /media/you/drive/TIMECRATE — an attached drive, a mounted share, or a folder another program syncs. It has to exist and be writable by that user, and a drive that is not mounted stops the backup rather than being quietly replaced by a directory on the disk you are backing up.

    Give each machine a folder of its own. A kit is named by its date and nothing else, so two machines sending to one folder would count, prune and try to verify each other's kits.

    For a second copy somewhere else: timecrate remote set-mirror <remote:path>|<folder>.

  3. Make the keys, as that user: timecrate init. Then escrow the secret key off this machine — timecrate escrow-doc writes a printable sheet with a QR code, timecrate export-key a file. It is deliberately not in the backups: without an escrowed copy, the kits are unrecoverable.

  4. Prove it: sudo timecrate backup, then sudo timecrate recovery-drill, then sudo timecrate escrow-confirm.

  5. Hear about failures: set TIMECRATE_ALERT_CMD (below) and run sudo timecrate alerts test.

The window (timecrate-gui) does all of this too, and every button runs the same command-line tool, so a machine without a desktop loses nothing.

Alerts

A failed backup, drill or capstone is always written to the journal. To be told anywhere else, put an executable in TIMECRATE_ALERT_CMD (in /etc/timecrate/timecrate.conf, or in the root-only /etc/timecrate.env if it needs a token). Every alert runs it as

<command> <severity> <title> <key>        # the message on standard input

with severity critical, warn or info, and a key naming the kind of alert (backup, remote, drill, capstone, overnight, unit-<name>, test) so a receiver can update one message instead of adding another. Exit 0 means delivered. For example, to mail yourself:

#!/bin/sh
mail -s "[$1] $2" you@example.com

TIMECRATE_ESCROW_KEY_CMD works the same way for the escrowed key: a command that prints it from your password manager or secret store lets the drill prove the off-box copy, and lets timecrate harden check it before removing the on-box one.

Documentation

Where your data lives

Path Purpose
/etc/timecrate/timecrate.conf Settings (world-readable: never credentials)
~/.config/timecrate/timecrate.conf The account's own settings: destination, second copy, retention, kit posture. Read as settings, never run
/etc/timecrate/include, /etc/timecrate/exclude What goes into a kit, and what is pruned from it
/etc/timecrate.env Root-only secrets, mode 0600, for your alert or escrow-key command. Only its RCLONE_* settings reach rclone
~/.config/timecrate/ The keyring, the escrow file and the pinned signing fingerprint — never in a kit
~/.config/rclone/rclone.conf rclone's own configuration and token — never in a kit
~/.local/state/timecrate/ History, status and the anti-rollback anchor
/var/lib/timecrate/staging Root-only working space while a kit is built or restored

Timecrate talks to nothing but your remote, and to whatever your alert and escrow-key commands reach.

Contributing and support

Development

The suites install packages and replace rclone with fakes, so they run as root in a throwaway container:

docker run --rm -v "$PWD":/repo:ro ubuntu:26.04 bash /repo/tests/checks.sh
docker run --rm -v "$PWD":/repo:ro ubuntu:26.04 bash /repo/tests/gui-smoke.sh
tests/package.sh                     # installs and upgrades the packages under systemd
scripts/build.sh                     # both .deb packages, into dist/

Licence

GPL-2.0-or-later © Spencer Norton

Timecrate was developed alongside a fork of Timeshift and shares no code with it; it is not affiliated with Linux Mint.

About

Encrypted Ubuntu configuration backups with off-site storage and scheduled restore tests.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages