Skip to content

A local-first personal finance app

Fixing #608 by documenting the actual process. (#698)

Ruben Olsen Lærk2c1d5eeeff9f
diff --git a/docs/backup-restore/restore.md b/docs/backup-restore/restore.md
index cb73e7649f..99bbdf6ef7 100644
--- a/docs/backup-restore/restore.md
+++ b/docs/backup-restore/restore.md
@@ -3,52 +3,63 @@
## Restoring a Manual Backup
If you previously followed the [steps](./backup.md) to back up your data and have an Actual
-zip export, you can now import that using the web version of Actual.
+zip export, you can restore this backup by importing it using the web version of
-To do this:
+### Steps to Restore a Backup:
-1. login to your budget, then in the top right corner click 'Server'
+1. Close your current budget by clicking on the budget name in the top left
+corner of the screen and choosing the option to close the budget file.
- ![](/img/restore/actual-config-7.png)
+ ![Close the current budget file](/img/backup-restore/restore-close-budget.png)
-1. Then select Logout
+2. In the *Budget Selection Screen*, or File Screen that appears, click on *Import file*.
- ![](/img/restore/actual-config-8.png)
+ ![Click on the import file link](/img/backup-restore/restore-import-file.png)
-1. Log back into your instance of Actual
+3. Choose the *Actual* option.
- ![](/img/restore/actual-config-9.png)
+ ![Click on the import file link](/img/backup-restore/restore-import-file-dialog.png)
-1. From the next screen select Import File
- ![](/img/migrating/actual-import-1.png)
+4. Then click on the *Select file...* button.
-1. Select Actual and then locate your Zip file, this will then import what you previously exported into
- Actual.
+ ![Click on the import file link](/img/backup-restore/restore-import-file-select-file.png)
+
+5. Navigate to the location of where you stored your backup file, select it and click
+on the *upload button*.
+
+ ![Click on the import file link](/img/backup-restore/restore-import-file-choose-file.png)
+
+
+That is it. The backup is now restored. If the imported budget is a copy
+of your current budget, you may want to rename the import by clicking on its name
+and rename it. Once you verify the new imported budget is correct, you can
+navigate back to the budget selection screen by closing the current budget
+and deleting the old copy.
+
+![Click on the import file link](/img/backup-restore/restore-import-imported-budget.png)
- ![](/img/migrating/actual-import-2.png)
-That is it. A fresh budget will show in your budget list. If the imported data is a copy of your current budget, you may want to rename the new budget by clicking on its name so you can tell them apart. Once you verify the new imported budget is correct, you can navigate back to the budget selection screen by closing the current budget and deleting the old copy.
## Errors When Restoring Database From Backup
-It is possible that you may encounter an error during restoration that says:
+You may encounter an error during restoration that says:
`This budget cannot be loaded with this version of the app. Make sure the app is up-to-date.`
-This should only happen when you're upgrading from a Docker image with the `edge` tag to a stable release, such as `latest`. This should not happen in other instances. If you find yourself seeing this bug, please submit a bug report.
+This should only happen when you upgrade from a Docker image with the `edge` tag to a stable release, such as `latest`. It should not happen in other instances. If you see this bug, please submit a bug report.
**IMPORTANT NOTE**: You *MUST* download a backup of each of your budgets using the process outlined above **before** continuing. It's always good practice to backup your data before upgrading to a new version.
-The fix for this is to manually migrate the your SQLite database in the steps outlined below:
+The fix for this is to migrate your SQLite database in the steps outlined below manually:
1. Download and install [SQLite Browser](https://sqlitebrowser.org/)
1. Unzip the backup budget `.zip` file. The filename should look like: `yyyy-mm-dd-My-Finances-abcd1234.zip`
1. Open SQLite Browser. Click on the "Open Database" button and navigate to the file you just unzipped. You're looking for a file named `db.sqlite`.
1. Load the file and click on the `Browse Data` tab. Select the `__migrations__` table from the table dropdown menu.
-1. You should see a list of integers under the column labeled `id`. Cross-reference the entries in this table with the list of [database migrations](https://github.com/actualbudget/actual/tree/master/packages/loot-core/migrations) in the main Actual repository.
-1. For every integer that's missing, you'll want to click on the `.sql` file associated with it and copy the raw data.
+1. You should see a list of integers under the' id' column. Cross-reference the entries in this table with the list of [database migrations](https://github.com/actualbudget/actual/tree/master/packages/loot-core/migrations) in the main Actual repository.
+1. For every integer that's missing, click on the `.sql` file associated with it and copy the raw data.
1. Run the SQL query in the Execute tab of SQLite Browser. Be sure to check the output that the command was successful.
-1. If the sql query that you copied is successful, you'll want to insert the migration command's id into the `__migrations__` table by executing `insert into __migrations__ values(id_of_missing_migration_command);`.
+1. If the SQL query that you copied is successful, you'll want to insert the migration command's id into the `__migrations__` table by executing `insert into __migrations__ values(id_of_missing_migration_command);`.
1. Once your `__migrations__` table matches the database migrations folder, commit and close the database.
1. Rezip your modified `db.sqlite` and `metadata.json` files into a zip file.
1. Retry the restore process outlined above.
@@ -56,16 +67,18 @@ The fix for this is to manually migrate the your SQLite database in the steps ou
## Automatic Backups
:::caution
-Automatic backups are currently only available in the (beta) desktop app.
+Automatic backups are currently only available in the desktop app.
:::
-Actual keeps backups of your data locally. If something disastrous happens, you can always load a recent backup to get your data back.
+Actual keeps backups of your data locally. If something disastrous happens, you can always load a recent backup to regain your data.
+
+Currently, it keeps up to 10 backups, one for each you used the app, and multiple backups of the current day. The result is you will have data backed up **up to the last 15 minutes**, in addition to the previous 10 days you used the app.
-Currently it keeps up to 10 backups, one per day of usage of the app, multiple backups of the current day. The result is you will have data backed **up to the last 15 minutes**, in addition to the last 10 days you used the app.
### Loading an Automatic Backup
- Select the **File > Load Backup…** menu item
- Choose the backup you want to load and select it
-The app will reload with the data from that backup. If you want to keep using that backup, you don't have to do anything else, just keep using the app. If you want to go back to the previous data, open the backup menu again and select **Revert to original version**. This option will be available until another backup is made.
+
+The app will reload with the data from that backup. If you want to keep using that backup, you don't have to do anything else; keep using the app. If you wish to return to the previous data, reopen the backup menu and select **Revert to original version**. This option will be available until another backup is made.
diff --git a/static/img/backup-restore/restore-close-budget.png b/static/img/backup-restore/restore-close-budget.png
new file mode 100644
index 0000000000..00d8d65086
Binary files /dev/null and b/static/img/backup-restore/restore-close-budget.png differ
diff --git a/static/img/backup-restore/restore-import-file-choose-file.png b/static/img/backup-restore/restore-import-file-choose-file.png
new file mode 100644
index 0000000000..6054ceae2a
Binary files /dev/null and b/static/img/backup-restore/restore-import-file-choose-file.png differ
diff --git a/static/img/backup-restore/restore-import-file-dialog.png b/static/img/backup-restore/restore-import-file-dialog.png
new file mode 100644
index 0000000000..ef8d3183c5
Binary files /dev/null and b/static/img/backup-restore/restore-import-file-dialog.png differ
diff --git a/static/img/backup-restore/restore-import-file-select-file.png b/static/img/backup-restore/restore-import-file-select-file.png
new file mode 100644
index 0000000000..92906aab36
Binary files /dev/null and b/static/img/backup-restore/restore-import-file-select-file.png differ
diff --git a/static/img/backup-restore/restore-import-file.png b/static/img/backup-restore/restore-import-file.png
new file mode 100644
index 0000000000..367fb94720
Binary files /dev/null and b/static/img/backup-restore/restore-import-file.png differ
diff --git a/static/img/backup-restore/restore-import-imported-budget.png b/static/img/backup-restore/restore-import-imported-budget.png
new file mode 100644
index 0000000000..2714040578
Binary files /dev/null and b/static/img/backup-restore/restore-import-imported-budget.png differ
diff --git a/static/img/restore/actual-config-10.png b/static/img/restore/actual-config-10.png
deleted file mode 100644
index a5292ab5b4..0000000000
Binary files a/static/img/restore/actual-config-10.png and /dev/null differ
diff --git a/static/img/restore/actual-config-11.png b/static/img/restore/actual-config-11.png
deleted file mode 100644
index 2510dcdfb6..0000000000
Binary files a/static/img/restore/actual-config-11.png and /dev/null differ
diff --git a/static/img/restore/actual-config-7.png b/static/img/restore/actual-config-7.png
deleted file mode 100644
index f1f19b3f9c..0000000000
Binary files a/static/img/restore/actual-config-7.png and /dev/null differ
diff --git a/static/img/restore/actual-config-8.png b/static/img/restore/actual-config-8.png
deleted file mode 100644
index cb13cc2ade..0000000000
Binary files a/static/img/restore/actual-config-8.png and /dev/null differ
diff --git a/static/img/restore/actual-config-9.png b/static/img/restore/actual-config-9.png
deleted file mode 100644
index d0cc8d7d2e..0000000000
Binary files a/static/img/restore/actual-config-9.png and /dev/null differ