Home / Help Center / pos-app / Admin / Backup
💾 Admin

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.

📍 Menu path: Admin → Backup
👤 Who uses it: Admin and Manager (with create/delete permission) — desktop/Electron builds only

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

Step-by-Step Guide

1 Turn on automatic backups (Auto-Pilot)

  1. Open the Auto-Pilot tab and toggle it ON.
  2. Choose how often to run: Every hour, Every 6 hours, Once a day (2 AM), or Once a week (Sunday 2 AM).
  3. Choose where to save: This computer (local), Cloud server, or Google Drive.
  4. Set how many recent backups to keep (older ones are deleted automatically) — between 1 and 50.
  5. Click Save Settings. Use Run Now at any time to trigger an immediate backup outside the schedule.

2 Create and restore a local backup

  1. Open the Local tab and click Create & Download to snapshot the full database as a .db file to your computer.
  2. To restore, either drag a previously downloaded .db file into the Restore from File drop zone, or click Restore next to an entry already listed in Backup History.
  3. 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

  1. Open the Cloud tab and enter your Endpoint URL (any HTTP endpoint accepting multipart/form-data) and, if required, an API Key / Bearer Token.
  2. Choose an auto-schedule (Disabled, Daily at midnight, or Weekly on Sunday midnight) and click Save Settings.
  3. 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

  1. 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.
  2. Paste your Client ID and Client Secret and click Save Credentials, then Connect to Google Drive to authorize via a popup window.
  3. 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.
  4. 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 / ButtonWhat it does
Auto-Pilot toggleMaster 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 backupsRetention count (1–50); older automatic backups beyond this count are deleted automatically.
Run NowTriggers 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 tableLists 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

Troubleshooting & FAQ

I don't see this page in the sidebar at all.
Backup is marked local-only and only appears in the desktop/Electron build of the app — it is intentionally hidden on the cloud/web version, where backups are handled automatically by the hosting infrastructure instead. Use Import/Export there for a portable data copy.
Restoring a backup seems to have logged everyone out / restarted the app.
This is expected — restoring always creates a safety backup of your current data first and then restarts the server/app to load the restored database.
Google Drive backup fails or shows "not connected".
Confirm your Client ID/Secret are saved and that you completed the Connect popup flow; if the popup was blocked or closed early, click Connect again.
My cloud backup shows "Upload Failed" status.
The snapshot was still created locally but could not reach your configured Endpoint URL — check the URL and API key, and confirm the endpoint is online.

🧑‍💻 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-now
  • GET /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/:filename
  • GET /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/:id
  • GET /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/:id
  • GET /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.