backup / restore
turnout backup [APP] [--server SERVER] [--credential NAME] [--path NAME]turnout restore [APP] [--server SERVER] [--credential NAME] [--path NAME] [--from NAME] [--list]Backups are timestamped tar.gz archives of the target directory, stored on the server next to it in {dir}.backups/. App, server, credential and path resolve exactly like in turnout deploy.
| Flag | Short | Description |
|---|---|---|
--server |
-s |
Target server (defaults to the app’s current binding) |
--credential |
-C |
Credential to log in with (defaults to the server’s) |
--path |
-p |
Named path to back up (defaults to the server’s for this app) |
backup
Section titled “backup”turnout backup myapp --server prodCreates {dir}.backups/YYYYMMDD-HHMMSS.tar.gz and prints its name. turnout deploy --backup does the same right before touching the remote directory.
The timestamp is UTC and comes from your machine, not the server’s clock, so archives taken from different places still sort next to each other correctly.
restore
Section titled “restore”turnout restore myapp --server prod --list # what is availableturnout restore myapp --server prod # roll back to the newestturnout restore myapp --server prod --from 20260806-120000.tar.gz| Flag | Short | Description |
|---|---|---|
--server |
-s |
Target server (defaults to the app’s current binding) |
--credential |
-C |
Credential to log in with (defaults to the server’s) |
--path |
-p |
Named path to restore into (defaults to the server’s for this app) |
--from |
-f |
Backup archive name (defaults to the newest) |
--list |
-l |
List available backups and exit |
Restore empties the target directory, unpacks the chosen archive into it and runs the path’s post-write command (the same one deploy uses) if there is one - so a rollback also restarts the service.
“Newest” is decided by sorting the archive names, which are fixed-width timestamps - not by the order the server listed them in. Files in the backups directory that turnout did not write are ignored, so a note you left there will never be restored over your site.
turnout restore myapp -s prod -l # quick: which backups exist on prod