<!-- Source: https://lazyjack.app/guide/backup.md -->

# Backup, restore and moving devices

The boat's record lives on LazyJack's server, and every device you sign in on keeps a copy of it. This chapter is about the copies: the one you download and keep yourself, putting it back, starting a device afresh, and what each of the three permanent actions on the Account page removes.

All of it is on the **Account** page, in this order: Download a copy, Restore from a backup, and at the bottom "Clear data or delete account" with **Clear all data**, **Delete account** and **Reset this device**.

## Download a copy {#download}

**Download everything** makes one zip file of the whole record, with every photo and file. **Records only** (offered when the boat has files) leaves the files out and is much smaller. The card says how many files there are and their total size.

The zip holds:

| In the zip | What it is |
|---|---|
| `data.json` | Every record, archived ones included, and the whole activity list. This is what a restore reads. |
| `README.md` | What the folder is, what each list of records means, and how an assistant could read it. |
| `index.html` | The same record as one page to read or print, offline, in any browser. |
| `files/` | The photos, receipts and manuals, each named by its id. Not in a Records only copy. |
| `MISSING_FILES.txt` | Only when a file on record could not be found on the server when the copy was made. |

The file is named after the boat and the day, for example `boatmanager-artemis-2026-10-11.zip`, with `-records` added to a Records only copy.

- **Changes not yet synced are not in the copy.** The card says "N changes on this device have not reached the server yet and will not be in the copy" and offers **Sync now**. Sync first.
- **The download needs a connection.** Offline, the buttons are disabled and the card says "Reconnect to the internet to download your data."
- **The link lasts two minutes.** The app asks the server for a link and the browser saves the file straight from it. A link that has expired says "This download link has expired. Ask for a new one." Press the button again.
- **Each download is in the activity list** as "Exported all data" or "Exported all records (no files)".
- **The copy is not encrypted.** It holds everything about the boat. Keep it somewhere safe that is not the boat.

The readable page (`index.html`) is made to be handed to someone, so it leaves some things out on purpose. They are all still in `data.json`.

| Left out of the readable page | Why |
|---|---|
| Your email and phone from your profile | Contact details |
| A person's email, phone and beacon id | Contact details |
| The emergency contact in Tell someone | Contact details |
| The boat's purchase price | What you paid is private |
| Activity entries about assistant connections | They name the assistants you use |
| Activity older than the newest 200 entries | Length |

Assistant connections, pending approvals and the changes queued on a device are not in the zip at all, not even in `data.json`. A connection stands for a credential, and the queue belongs to one device.

## Restore from a backup {#restore}

A restore puts a copy made with Download everything (or Records only) back into your account, exactly as it was. It goes **only into an account with no boat**, and it is all or nothing: "Everything comes back as it was, or nothing changes."

There are two ways in.

- **From the Account page.** **Restore from a backup** opens a dialog. Step 1 offers **Download everything**, so you keep a copy of what is there now. Step 2 asks you to type RESTORE, then **Clear and choose a backup** clears the account (exactly as Clear all data does), reloads the app and opens the restore dialog by itself.
- **From the first screen.** An account with no boat shows "Have a backup? Restore from a backup" under the boat form, once the app has heard from the server that there is no boat, and only while online.

Then:

1. **Choose the backup file (.zip).** It is read on the device; nothing is sent until you confirm.
2. **Check the summary**: the boat's name, the day the copy was made, how many records and files. A Records only copy says "Documents will come back without their photos and files."
3. **Restore.** The records go in first, in one step.
4. **The files follow, one at a time**: "Uploading files: 14 of 37". You can close the dialog once the records are in; the files can be finished later.

**If the upload stops** (the connection drops, or the server asks to wait), the dialog pauses with **Try again**, which carries on with what is left, and **Stop here**. A file whose size or contents differ from what the backup describes is skipped and counted at the end.

**Finishing later.** While some files of a restore are still missing, the Account page shows "Some files are not back yet": "N files from your backup are not uploaded yet." **Choose the backup file** uploads only what the server still lacks, checking each against the backup. **I don't have these files** keeps the documents without their files; it asks first ("Keep documents without their files?") and cannot be undone.

What a restore brings back and what it does not:

| Comes back as it was | Does not come back |
|---|---|
| Every record, archived ones included | Assistant connections: connect each assistant again |
| Each record's id and version, and its dates | Pending approvals |
| The activity list, with its original times, plus one entry "Restored from a backup made on <day>" | Changes that were queued on a device when the copy was made |
| Your profile, the boat's photo and every document's attachments | Files the copy did not hold (a Records only copy, or a file listed in `MISSING_FILES.txt`) |

A restore keeps the records' ids, so the same backup cannot go into a second account on the same server while the first still holds those records: "This backup cannot be restored here because some of its records already exist on this server. If they are in another account of yours, delete that account first."

## Other devices after a clear or a restore {#stale-copy}

Clearing the account or restoring it on one device makes every other device's copy out of date. LazyJack calls such a copy stale and does not try to merge it: after a restore the same records exist again, often at the same versions, so a change made on the old copy would apply a second time.

On its next pull (within a minute while the app is open and online) or its next push, a stale device:

1. counts its unsynced changes and its queued files,
2. discards them,
3. reloads with the current copy from the server,
4. says "This boat's data was cleared or restored on another device. This device now shows the current copy." and, if it dropped anything, "3 changes and 1 file that had not synced were discarded."

A device that was offline does this when it reconnects. The counts in that note are the only trace of what was discarded. **Before you clear or restore, open the app on each of your other devices and let it sync.** The device that did the clearing or restoring is not affected.

## Reset this device {#reset-device}

**Reset this device** throws away the copy stored in this browser and loads it again from the account. It asks first: "This clears the copy stored in this browser, including any changes that have not synced yet. Your data on the server is not affected."

- **It works offline**, but the app then has nothing to show until it is online again.
- **It loses unsynced changes and queued files** on this device. Sync first if you can.
- **Use it** when this device's copy looks wrong and nothing in Sync problems explains it.

## Clear all data and Delete account {#clear-and-delete}

Both are permanent, both remove data from the server as well as the device, and both need a connection: offline the buttons are disabled and the card says "Reconnect to the internet to clear your data or delete your account." Each asks you to type a word (CLEAR, DELETE) before it acts.

| | Clear all data | Delete account | Reset this device |
|---|---|---|---|
| The boat and every record, file and activity entry | Removed | Removed | Kept on the server |
| Your profile | Removed | Removed | Kept |
| Assistant connections | Removed | Removed | Kept |
| This device's copy and its unsynced changes | Removed | Removed | Removed, then loaded again |
| Your sign-in | Kept: you start again from setting up the boat | Removed: you are signed out | Kept |
| Usage counts and feedback you sent | Kept | Removed | Kept |
| Other devices | Their copies become stale (see above) | Refused from then on ("This account was deleted."); the copy in their browser stays | Not affected |
| Needs a connection | Yes | Yes | No |

Usage counts (how many changes and requests were made each day, never what they were) and the feedback you sent are not records of the boat, so clearing the boat leaves them. Deleting the account removes them.

**Download a copy before either.** Neither can be undone, and LazyJack keeps no backup it can give back to you.

## For assistants {#for-assistants}

If you are an assistant connected to LazyJack, these are the rules for this chapter's ground.

1. **You cannot download, restore, clear or delete.** No tool exports a backup, restores one, clears the boat's data or deletes the account, and no connection is ever granted that. When the owner asks, say so and point them to the Account page (Backup; Clear data or delete account).
2. **A backup is not loaded through the tools.** Its `README.md` describes the record types so that a backup can be read; feeding `data.json` back through the create tools would make a similar account with new ids, new dates and a fresh activity list, not the owner's record. Tell the owner to use Restore from a backup instead.
3. **Never propose Clear all data or Reset this device as a fix.** A refused change belongs in Sync problems (see [Troubleshooting sync](sync-troubleshooting.html)); a wrong record is corrected in place. Both resets lose work, and one of them cannot be undone.
4. **After a clear or a restore you are disconnected.** Every connection is removed and a restore does not bring them back. If your calls start failing with a sign-in error, say that the boat was cleared or restored and that the owner must connect you again from the Account page.
5. **Before the owner clears or restores, remind them of the other devices**: anything not yet synced on another phone or computer is discarded when that device next syncs.

## A new device or browser {#new-device}

LazyJack is a web app that can be installed. Open `https://app.lazyjack.app` in the browser and sign in; to have it on the home screen, use the browser's own Install or Add to Home Screen.

- **The first visit needs a connection.** The app downloads itself and pulls the boat's copy. After that it opens offline, and a refresh offline still works.
- **Each signed-in person has their own copy.** If two people sign in on one browser with different accounts, each sees only their own boat; neither copy is shown to the other, and nothing is announced when you switch.
- **Signing out keeps this browser's copy.** Sign out does not remove the boat's copy or unsynced changes from the browser; signing back in finds them. Reset this device clears the copy but loads it again while you are signed in.
- **Offline is shown in the top bar.** The sync badge says "Offline" (on a wide screen, "Working offline"), and changes wait on the device until it reconnects.

**Moving to a new phone** needs nothing more than signing in on it. Let the old phone sync first (the Account page's Sync card says "Nothing is waiting to sync."), so nothing made only on it is left behind.

## Several devices at once {#several-devices}

You can use LazyJack on a phone, a tablet and a computer at the same time.

- **Changes reach the other devices within a minute.** Each device pulls the server's copy when the app opens, when it reconnects, after its own change is accepted, when its tab becomes visible, and every minute while it is open.
- **The same record changed on two devices** is refused on the second as "changed elsewhere" and waits in **Sync problems** on the Account page, where you apply it to the latest version or discard it. [Troubleshooting sync](sync-troubleshooting.html) explains each refusal.

## Limits {#limits}

| What | Limit |
|---|---|
| A download link | 2 minutes from asking for it |
| Downloads | 20 in 10 minutes |
| `data.json` in a backup being restored | 64 MB |
| Records in a backup being restored | 200,000 |
| One file in a backup | 100 MB |
| Files sent during a restore | 1,200 in 10 minutes; above that the dialog pauses with "Try again in N seconds" |
| Activity shown on the readable page | The newest 200 entries |
| How often an open device pulls | Every minute |

## When something goes wrong {#troubleshoot}

| What you see | What it means | What to do |
|---|---|---|
| "This download link has expired. Ask for a new one." | More than two minutes passed before the download started | Press Download everything again |
| "This account already has a boat. Clear its data first." | A restore goes only into an empty account | Use Restore from a backup on the Account page, which clears first |
| "This is not a LazyJack backup." | The file is not a zip made by Download everything, or its `data.json` was changed | Choose the zip exactly as it was downloaded |
| "This backup was made by a newer version of LazyJack. Update the app and try again." | The app on this device is older than the one that made the copy | Reload the app, then try again |
| "This backup cannot be restored here because some of its records already exist on this server…" | The same records are in another account | Delete that account first, then restore |
| "N files from your backup are not uploaded yet." | The restore's file step did not finish | Choose the backup file, or I don't have these files |
| "This boat's data was cleared or restored on another device…" | This device's copy was stale and was replaced | Nothing; anything it lists as discarded has to be made again |

## Not in this chapter {#not-here}

Why each device keeps a copy and how changes queue: [How LazyJack thinks](how-it-thinks.html). Refused changes, queued files and Sync problems day to day: [Troubleshooting sync](sync-troubleshooting.html). Connecting an assistant again after a restore: [Assistants](assistants.html). Setting up the boat after Clear all data: [Setting up the boat and engine](setting-up.html). A document's file, Add a file and Replace file: [Documents and papers](documents.html). Archive, Delete and the Archive card: [How LazyJack thinks](how-it-thinks.html#archive-and-delete).
