Cairn

Cairn 0.1.30

  • cairn-0.1.30-linux-x86_64 Linux x86-64: cairn, the client (the CLI and daemon), 11.0 MB 6e6ed14f8fdeeba8ba5ee1d91f31e24141483374a1698d255f0e72fd63d9c1f5
  • cairn-0.1.30-linux-x86_64-server Linux x86-64: cairn-server, the server, 8.0 MB 47ae043df5edb2846af4cec5941172d97adcdd1d8149b196558ef868a983faba
  • cairn-0.1.30-linux-aarch64 Linux ARM64 (aarch64): cairn, the client (the CLI and daemon), 8.8 MB d26dce3a44dfc2d5bd04b02da4fc289c44e0b9c4bc241cb77cf1095bd5b31af9
  • cairn-0.1.30-macos-universal.app.tar.gz macOS: Cairn.app, the CLI and daemon, 9.0 MB b02b0f611540771e069bc963229f59f3000e35b154cf7f8df406b8e3f9e9ed24
  • cairn-0.1.30-macos-universal-tray.app.tar.gz macOS: Cairn Tray.app, the tray, 7.3 MB 086158a098af8cd672714a205aaece04eaaccd6af393478a65c98c42e847b9bc
  • cairn-0.1.30-windows-x86_64.exe Windows x86-64: cairn.exe, the CLI and daemon, 12.2 MB f14f891dd5c508d09ccb99dff031a5c7e892f27bf577d2f7b8ccf97f745b4d8c
  • cairn-0.1.30-windows-x86_64-tray.exe Windows x86-64: cairn-tray.exe, the tray, 10.5 MB 609cc06cbfd99d7a9a25df583ceff1e103923a3ee5b257f2b1c9ae3a982a110a
  • cairn-0.1.30-android.apk Android 11 and later: Cairn, the app, which backs up photos and videos and browses the server, 35.2 MB 2f5cd503f3879d812bb8b69218a79efbd1700bb92353facb548deded66ae0540
  • cairn-0.1.30.sha256 every file's SHA-256: sha256sum -c --ignore-missing cairn-0.1.30.sha256 8a8dd273c9f6a4cb5c5fdd5fafd6f5b7f45f9c48ef3b7bf354a3bde26c283eaa
  • update.json the signed list of these files, which every installed copy checks 9db9cfc0b8bced566dca28433eebc5d29a5f3d020b6321aaec593dd40d38d78f

The same files are in GitHub's release v0.1.30.

The server takes, ahead of the clients, what they will ask of it: passwords for the web and devices paired by a code, each user's own tokens, thumbnails, a file changed in one request, resumable uploads as the phones' systems speak them, and each folder's retention with a collection that never removes what a kept revision or an acknowledged commit names. Each is named in the server's features, so later clients ask first and work with this server and older ones alike.

This is early software. Keep another copy of anything you put through it.

Linux (static), the client on each device, cairn-0.1.30-linux-x86_64 or, on ARM64, cairn-0.1.30-linux-aarch64, and the server, x86_64, on one machine:

sha256sum -c --ignore-missing cairn-0.1.30.sha256
install -D -m 755 cairn-0.1.30-linux-x86_64 ~/.local/bin/cairn       # ARM64: cairn-0.1.30-linux-aarch64
sudo install -m 755 cairn-0.1.30-linux-x86_64-server /usr/local/bin/cairn-server

macOS: unpack cairn-0.1.30-macos-universal.app.tar.gz (Cairn.app) and cairn-0.1.30-macos-universal-tray.app.tar.gz (Cairn Tray.app) into ~/Applications; README.md has the launchd agent for Cairn.app. Windows: put cairn-0.1.30-windows-x86_64.exe and cairn-0.1.30-windows-x86_64-tray.exe in a folder of their own as cairn.exe and cairn-tray.exe. cairn-0.1.30.sha256 is every file's SHA-256, and update.json the signed list of this release's files that every installed copy checks.

Android 11 and later: open cairn-0.1.30-android.apk on the phone, and install it over the app to update it; the app's manual shows each step. It does not update itself. Every APK of the app is signed by the same key, its certificate's SHA-256 dc981e26f3084defacb05268103e31ba30eb7cd6c01734ae9f19742f56009006, which apksigner verify --print-certs cairn-0.1.30-android.apk shows; Android installs an update only when that key signed it.

Every file is at https://cairn.storage/download/0.1.30.html and in GitHub's release v0.1.30, each with its SHA-256.

The server has changed in this release: upgrade it before the clients.

Changes in 0.1.30

Added:

  • The server names what it does beyond what every server of the protocol does in features in /info and /v1/me so a newer client asks first and does without what an older server lacks, with no upgrade of the server first.
  • A web item carries its file's manifest hash, the one a client makes of the same bytes, so a phone after a reinstall skips what it sent before without sending it again.
  • Each user lists, makes, relabels and takes back their own tokens through /v1/tokens and /v1/me names the token a request came with, so a lost phone is signed out from any of the user's devices. Each token has a kind, device browser or paired and the hour it was last used, which cairn-server token list shows.
  • Pairing: a signed-in device or the web asks POST /v1/pair for a code, with its link and QR code, and a new device trades it at POST /v1/pair/claim for a token of its own, within ten minutes and once.
  • Passwords for the web: cairn-server user password sets one, a user changes their own at PUT /v1/me/password and a sign-in by one makes a token for that browser alone, which signing out takes back. A password changed signs out every browser it signed in.
  • PUT /file changes a file already there given base the revision the client saw, keeping everything of it but its mtime; changed since by another, the bytes go beside it as a conflict copy, never in its place, and a file deleted since comes back where it was. So a phone's Files app can change files in one request.
  • Thumbnails at GET B/thumb/{object} made on the first ask from JPEG, PNG, WebP and GIF, turned as their EXIF says, and kept; for HEIC and video a client sends its own, which every size is made from.
  • Resumable uploads: PUT /file speaks the IETF's resumable uploads draft in interop versions 3 5 and 6 as the phones' systems do, a 104 telling where an upload can go on from, so a large video cut off sends only what is left. The server answers on its own accept loop, which can send that 104.
  • The web interface signs in with a user's name and password beside a token, and says so where a server takes none. Its Settings set, change or remove the password, and list every device and browser signed in as the user, each renamed in place or signed out alone, this browser too; Add a device shows a pairing code and its QR code with the time it has left. A folder shows a thumbnail in place of each picture's and video's icon where there is one, loaded as it scrolls near, and a picture's preview shows the larger one while the file itself loads, a HEIC's in place of the file no browser shows.
  • Retention, each folder's own: cairn-server folder retention <folder> --keep or a manager at PUT /v1/ns/{ns}/retention sets a policy such as all 2d, hourly 1d, daily 30d, weekly forever; trash 30d and the server gives up what it does once a day, the content of each revision and nothing else of it, so a device away for any length of time still replays all it missed. With no policy, how every folder starts, everything is kept and nothing removed. What was given up answers so: a download or restore with Gone, a history entry with pruned an undelete past the trash period refused, and cairn export and cairn restore of a past state refuse, naming what is gone, unless given --skip-pruned which leaves it out and says so. A policy set again gives back what no collection took yet.
  • A collection inside the server, once a day, removes the chunks nothing kept names, those given up a delay ago, serve --gc-delay a week by default, and orphans older than the upload grace --upload-grace two days by default; cairn-server gc does it with the server stopped, and beside one says what it would do with --dry-run or what was done with --status No commit is ever acknowledged without its chunks: a commit holds its chunk directory's gate from its check to its commit and vouches for each chunk it looks at, and one-request uploads hold theirs until their commit returns. A backup holding data/backup.lock holds every removal back.

Changed:

  • cairn-server fsck only reads the chunk stores, so a backup's database checked against a live store's chunks changes nothing there, and counts what retention gave up apart from damage.

  • The server's database moves to schema 6 when a server opens it, in one transaction: room for users' passwords, each token's kind and last use, and each folder's retention and collections. cairn-server downgrade moves it back one schema each time it runs, and says what goes with it.

Fixed:

  • The server looks a commit's operation ID up before it checks the commit's chunks, so a commit it took whose answer was lost is answered as it was when it is sent again, even once its chunks are gone, as a collector may take them in between.