Backups
When highsea backs itself up, what a backup holds, and how to download, restore or move one.
Written for highsea 0.1.0.
A backup is one zip file holding highsea's database: settings, people, history and the library's records. Your films, downloads and subtitles aren't in it; they live on their own disks.
Two places look after backups, and only the Owner sees either:
- Settings › Backups sets the schedule, how many to keep and where they go.
- System › Backups lists them, makes one now, downloads, restores and deletes them.
The schedule
| Setting | What it does | Default |
|---|---|---|
| Back up | Every day, Every week or Never. | Every day |
| On | The day of the week, for a weekly backup. | Sunday |
| At | The time, in the server's time zone from Settings › General. | 03:30 |
| Keep the last | How many scheduled backups to keep, from 1 to 365. Older ones are deleted as new ones arrive. | 14 |
| Folder | Where the zips go. | /config/backups |
Choose Save to apply them. highsea checks that it can write to a new folder before it saves.
With Never, nothing is backed up on its own, and a failed disk takes your settings, history and people with it.
The default folder is inside the config folder, on the same disk as everything else. If you can, mount another disk into the container and point Folder at it, or copy the backups somewhere else from time to time.
Kinds of backup
System › Backups marks each backup with how it was made:
| Kind | Made | Removed |
|---|---|---|
| Scheduled | On the schedule. | When there are more than Keep the last. |
| Made by hand | With Back up now. | Only when you delete it. |
| Before an update | When a new version of highsea changes the database, before it does. | Only when you delete it. |
| Before a restore | Just before a restore, holding what was there. | Only when you delete it. |
Each row also shows when it was made, the highsea version that made it, and its size.
Make a backup now
In System › Backups, choose Back up now. It appears at the top of the list a moment later.
Download a backup
Choose Download beside a backup to save its zip. Keep a copy off the server, on another disk, another machine or a cloud drive, so one failed disk can't take both.
The secret key
Backups never hold secret.key, the file in the config folder that seals passwords and tokens, such as provider accounts and two-step verification. Copy it somewhere safe yourself, once: it doesn't change. To restore on another machine, put that file in its config folder first, or sign-ins and connections stop working.
Restore a backup
- In System › Backups, choose Restore beside the backup.
- Read what will happen, then choose Restore and restart.
highsea first makes a Before a restore backup of what's there now, then restarts on the one you chose. Settings, people and history go back to that moment, and anything since is lost. Media files aren't touched, and apps reconnect on their own. The page reloads when the server is back, usually within a minute.
highsea checks each backup before it restores it:
- A backup made by a newer version of highsea is refused: update highsea first.
- A file that isn't a highsea backup, or can't be read, says so in the list and can't be restored.
- If the restored database doesn't start, highsea puts the previous one back and says why in System › Health.
The container needs a restart policy
To restart on the backup, highsea stops itself on purpose and relies on Docker to start it again. Every compose file and template in these guides sets restart: unless-stopped. Without a restart policy, start the container again yourself.
Restore a backup from somewhere else
System › Backups lists every highsea backup in the backups folder. To restore one you downloaded or copied away, put the zip back in that folder, keeping its file name, which begins with highsea-. It shows in the list, ready to restore.
Move to another machine
The simplest way is to copy the whole config folder, which carries secret.key with it. Upgrade walks through it.
To move with a backup instead:
- On the new machine, put your
secret.keyin the config folder before starting highsea there for the first time. highsea makes a new key when it finds none, and a new key can't open what the old one sealed. - Start highsea and go through setup, so you can sign in.
- Put the backup zip in the backups folder, then restore it from System › Backups. Your people, settings and history come back with it, including your old Owner account.
Keep the data folder at /data inside the container, so the library's paths still match.