Backup
Backup gives you four ways to protect your data on the desktop app: a fully automatic Auto-Pilot schedule, manual local .db snapshots, uploads to a cloud HTTP endpoint, and uploads to your own Google Drive.
Overview
This page only shows its full manual-backup tooling on the desktop/Electron build. In the cloud/web version, it instead shows an informational message explaining that backups are handled automatically by the hosting infrastructure, with a pointer to Import/Export for a portable data copy.
On desktop, four tabs are available: Auto-Pilot for a hands-off recurring schedule, Local for manual on-demand backups saved as a downloadable .db file, Cloud for uploading backups to any HTTP endpoint you configure, and Google Drive for uploading straight into your own Drive account.
Restoring from any backup source always creates an automatic safety backup of your current data first, and requires the app/server to restart to complete the restore.
Before You Start
- Requires the
backupfeature to be enabled on your plan. - Full manual backup tooling (Local / Cloud / Google Drive tabs and restore actions) is only available on the desktop/Electron build — this page is marked
localOnlyin the navigation and does not appear at all on the cloud/web version. - For Google Drive, you need your own OAuth 2.0 Client ID and Client Secret from the Google Cloud Console before you can connect.
Step-by-Step Guide
1 Turn on automatic backups (Auto-Pilot)
- Open the Auto-Pilot tab and toggle it ON.
- Choose how often to run: Every hour, Every 6 hours, Once a day (2 AM), or Once a week (Sunday 2 AM).
- Choose where to save: This computer (local), Cloud server, or Google Drive.
- Set how many recent backups to keep (older ones are deleted automatically) — between 1 and 50.
- Click Save Settings. Use Run Now at any time to trigger an immediate backup outside the schedule.
2 Create and restore a local backup
- Open the Local tab and click Create & Download to snapshot the full database as a
.dbfile to your computer. - To restore, either drag a previously downloaded
.dbfile into the Restore from File drop zone, or click Restore next to an entry already listed in Backup History. - Confirm the restore prompt — this replaces all current data with the backup's contents. A safety backup of your current data is created automatically first, and the server restarts to complete the process.
3 Configure and use cloud backups
- Open the Cloud tab and enter your Endpoint URL (any HTTP endpoint accepting multipart/form-data) and, if required, an API Key / Bearer Token.
- Choose an auto-schedule (Disabled, Daily at midnight, or Weekly on Sunday midnight) and click Save Settings.
- Click Create Cloud Backup to snapshot and upload immediately; review, download, restore or delete past uploads from Cloud Backup History.
4 Connect and back up to Google Drive
- Open the Google Drive tab. If not yet configured, open Google Cloud Console, create a project, enable the Drive API, and create an OAuth 2.0 Client ID (Web) with the redirect URI shown on screen.
- Paste your Client ID and Client Secret and click Save Credentials, then Connect to Google Drive to authorize via a popup window.
- Once connected, click Backup Now to upload a snapshot into a dedicated "BillingApp Backups" folder in your Drive — only files created by this app are accessible to it.
- Use Restore next to any entry in Drive Backup History to roll back to that snapshot; use Disconnect to revoke access (existing Drive files remain in your Drive).
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Auto-Pilot toggle | Master on/off switch for scheduled automatic backups. |
How often (schedule) | Every hour, Every 6 hours, Once a day (2 AM), or Once a week (Sunday 2 AM). |
Save to (destination) | This computer (local), Cloud server, or Google Drive — where automatic backups are stored. |
Keep last N backups | Retention count (1–50); older automatic backups beyond this count are deleted automatically. |
Run Now | Triggers an Auto-Pilot backup immediately, independent of the schedule. |
Create & Download (Local) | Generates a full .db snapshot and downloads it to your computer immediately. |
Restore from File (Local) | Drag-and-drop or browse to upload a previously downloaded .db file and restore from it. |
Backup History table | Lists past backups with filename, size, created date, and (for cloud/local) status, with download/restore/delete row actions. |
Endpoint URL (Cloud) | Any HTTP endpoint accepting multipart/form-data uploads; leave blank to store backups locally only. |
API Key / Bearer Token (Cloud) | Optional credential sent with each upload to the configured endpoint. |
Auto-Schedule (Cloud) | Disabled, Daily (midnight), or Weekly (Sunday midnight) — separate from the Auto-Pilot tab's own schedule. |
Client ID / Client Secret (Google Drive) | OAuth 2.0 credentials from Google Cloud Console, required once to enable the Connect flow. |
Connect / Disconnect (Google Drive) | Authorizes (via popup) or revokes this app's access to your Google Drive account. |
Tips & Best Practices
- Turn on Auto-Pilot as your baseline safety net, then use Local/Cloud/Google Drive manual backups for extra copies before risky operations like a bulk import or a data restore.
- Store at least one backup off-site (Cloud or Google Drive) — a local-only backup does not protect you if the computer itself is lost, stolen, or damaged.
- Periodically test a restore on a spare machine if possible — knowing your backups actually restore cleanly is as important as taking them.
Troubleshooting & FAQ
I don't see this page in the sidebar at all.
Restoring a backup seems to have logged everyone out / restarted the app.
Google Drive backup fails or shows "not connected".
My cloud backup shows "Upload Failed" status.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/BackupPage.jsx
Backend endpoints used:
GET /backup/auto/status, POST /backup/auto/settings, POST /backup/auto/run-nowGET /backup/local/list, POST /backup/local/create, GET /backup/local/download/:filename, POST /backup/local/restore-upload, POST /backup/local/restore-stored, DELETE /backup/local/:filenameGET /backup/cloud/settings, POST /backup/cloud/settings, GET /backup/cloud/list, POST /backup/cloud/create, GET /backup/cloud/download/:id, POST /backup/cloud/restore/:id, DELETE /backup/cloud/:idGET /backup/google/status, POST /backup/google/config, GET /backup/google/auth-url, POST /backup/google/disconnect, GET /backup/google/list, POST /backup/google/backup, POST /backup/google/restore/:idGET /tenant/config (used to detect desktop vs. SaaS deployment mode)
Related tables (db-core repositories):
BackupLog / AutoBackupSettings (best-effort)
Feature flag key: backup
The page checks GET /tenant/config for deploymentMode and renders the full tabbed tooling only when it is "desktop"; otherwise it shows a SaasBackupInfo explainer panel pointing users to Data Export & Import instead. This mirrors the localOnly: true flag on the Backup nav item.