Restore a copy of the data directory
Bring back the same instance, keys and sign-ins included, from a snapshot or a stopped copy of its data directory, and settle the work each device kept.
A copy of the data directory brings back the same instance, keys and sign-ins included. A backup brings back the data into a new instance, and needs only its place.
Take a copy that's whole
The copy must be an image of one moment: a copy taken with the server stopped, or a snapshot, such as a host's disk snapshot or Time Machine, which copies from an APFS snapshot. A file-by-file copy of a running server can hold a database that isn't whole.
Keep the server's secrets with the copy: marfa.env from the install folder, or marfa.secrets where the server made them, or the two variables your platform holds.
- With a different
MARFA_KEY_SALT, the server starts but refuses every key and app token, and every browser is signed out: sign in as the owner again and make new keys. - A different
MARFA_AUTH_SECRETalso signs everyone out of the browser. - Without
marfa.settings.key, inside the data directory, which seals the secret settings, each must be set again.
Settle the work each device kept
A device keeps the work the copy lost. Each app or synced folder that wrote after the copy's moment finds that the server went back, and queues that work again, blocked server_restored, so nothing is sent back unasked: you may have restored the copy to undo it.
On each device, send it or drop it:
marfa device release --reason server_restored
marfa device withdraw <id>A restore from an archive or a backup only adds to what the server holds, and sets off none of this.
The rules behind this page are in the backing up section of the instance chapter and the device chapter of the contract.