backups
Read when someone asks about backups, wants their network backed up to a disk or to S3-compatible storage, wants something they lost brought back, or has lost the network's bucket.
Files14
View on GitHubSKILL.mdapps/backups/SKILL.md
GitHubBackups are copies of the whole network, every person's and group's data, to a folder on one of the network's
machines (as on a disk plugged into it) or to S3-compatible storage. They're the network's: an owner of it uses these
tools for the network (ONE_SUBJECT=network, and subject: "network" from an app).
- A backup holds the network's blobs as they are, so it's trusted as the network's own storage is: what's encrypted there, like a Vault item, is encrypted in the backup too, and the rest isn't. Whoever can reach a destination restores from it; no key is needed.
destinationslists where backups go, each with when it last finished, how long it took, how big it is, its backups, and what's wrong if anything is. It says how often backups are made and which are kept.addadds a destination. A folder is a whole path on a machine that runs the serviceBackups.Disk(services, theninstall_serviceon the machine the disk is on). S3-compatible storage is itsendpoint, itsbucket(and a folder in it after a/) and anitemin the network's Vault, with fieldsaccess_key_idandsecret_access_key, switched on forbackups: ask for it withvault_request,app: "backups", for the network. A destination is tried before it's added.nowbacks up at once and answers with what was sent.schedulesets how often it happens by itself: everyhour,day(the usual) orweek, ornever. Every backup is kept for a day, then one a day for a week, one a week for a month and one a month for a year.checkreads a destination's newest backup back whole and compares every object with what was sent. A problem it finds, or a backup that failed, shows on the destination indestinations.restorebrings back what a backup holds that's gone from the network, by how its names start:users/alice/for a person,users/alice/own/notes/for what one app keeps for them (andusers/alice/made/notes/for what it made them), or one blob's whole name. It changes nothing that's there, so it can't put a database back to an earlier moment over what's there now. Settings › Backups does the same, for a person, an app or a file.removestops backing up to a destination. What's there stays.- A destination whose last backup failed, or with none finished within its schedule and a day, needs its owners: it's
the red count on Backups in Settings (
badge), Telemetry'sbackupalert, and the network's owner is notified once, until it's backed up again.
When the bucket itself is gone, the network is restored into an empty one on any machine, with no network running:
one restore --from <destination> --to <empty bucket>
A destination or a bucket is a folder, or https://<endpoint>/<bucket>[/<folder>] with --from-keys or --to-keys
naming a file of ACCESS_KEY_ID= and SECRET_ACCESS_KEY= lines. --list lists a destination's backups, and --backup
picks one. Then a server is started on the bucket: the first one is the network's, and its other servers are added
again.