Skip to content

Local Backups

ZestSSH stores encrypted .zest backup files directly on the device filesystem. Local backups are the simplest backup method — no server or cloud account required.

  1. Go to Settings > Backup & Restore > Export Backup.
  2. Enter a backup password (minimum 12 characters).
  3. Tap Export.
  4. The encrypted .zest file is written to the platform-specific location (see below).
  1. Go to Settings > Backup & Restore > Import Backup.
  2. Select a .zest file from your device.
  3. Enter the backup password.
  4. ZestSSH decrypts and restores the data using additive merge (existing data is updated, new data is inserted, nothing is deleted).

See Encrypted Backups for full details on the .zest format and encryption.

ZestSSH can automatically create backups on a schedule or when data changes.

  1. Go to Settings > Backup & Restore > Auto-Backup.
  2. Set a backup password. This password is stored in Flutter Secure Storage and used for all automatic backups.
  3. Choose an interval:
    • Daily — Backup once every 24 hours.
    • Weekly — Backup once every 7 days.
    • Off — Disable auto-backup.

Scheduled check: On every app launch, ZestSSH checks whether enough time has elapsed since the last auto-backup. If the interval has passed, an encrypted backup runs automatically in the background.

On-change backup: When auto-backup is enabled, ZestSSH can also trigger a backup when the app goes to background and data has changed. This ensures that recent configuration changes are captured promptly.

The auto-backup password is stored in Flutter Secure Storage under a dedicated key (auto_backup_password). It is:

  • Set once during auto-backup setup.
  • Used for all subsequent automatic backups.
  • Separate from any manual backup passwords you choose.
  • Required — if no password is set, auto-backup is silently skipped.

Auto-backups maintain a maximum of 3 files. When a new auto-backup completes:

  1. All files matching the zestssh_auto_*.zest pattern in the backup directory are listed.
  2. Files are sorted by modification time (newest first).
  3. Any files beyond the 3-file limit are deleted.

Manual backups (zestssh_backup_*.zest) are never automatically deleted.

  • Auto-backups: zestssh_auto_YYYY-MM-DDTHH-MM-SS.zest
  • Manual backups: zestssh_backup_YYYY-MM-DDTHH-MM-SS.zest

The distinct prefix allows auto-backup cleanup to only affect automatic files.

PlatformLocationAccessible to UserSurvives Uninstall
Android/storage/emulated/0/Download/Yes (Downloads folder)Yes (shared storage)
iOSApplication Documents directoryYes (via Files app)No (app-scoped)
WindowsDocuments\ZestSSH\backups\YesYes
macOS~/Documents/ZestSSH/backups/YesYes
Linux~/.local/share/documents/ZestSSH/backups/ or equivalentYesYes

Android: Backups are written to the shared Downloads folder, which is accessible to the user and other apps. The file is encrypted, so exposure is limited to the ciphertext.

iOS: Backups are written to the app’s Documents directory, which is visible in the iOS Files app under the ZestSSH section. However, this directory is deleted when the app is uninstalled. Consider using WebDAV or Google Drive as an additional destination for persistence.

Desktop: Backups go to a ZestSSH/backups subdirectory under the system Documents folder. This directory persists across app reinstallation.

When importing a backup:

  1. The file is validated (must have ZEST magic bytes).
  2. The version byte is checked.
  3. For encrypted backups (version 1), the password is required.
  4. Decryption occurs in memory (AES-256-GCM).
  5. Data is restored via additive merge into the database.
  6. Identity secrets (passwords, private keys) are written to secure storage after the database transaction succeeds.
  7. Files larger than 50 MB are rejected to prevent memory issues.

The local backup destination reports survivesUninstall = false as a conservative default. On Android and iOS, app-scoped storage can be wiped on uninstall. On desktop, the Documents folder persists, but the flag encourages users to also configure a cloud destination.

For a backup that reliably survives uninstall, use WebDAV or Google Drive as a backup destination.

In addition to local and WebDAV destinations, ZestSSH supports Google Drive as a backup destination:

  • Uses the drive.file scope — ZestSSH can only access files it created, never your other Drive files.
  • Backups are stored in a “ZestSSH Backups” folder in your Drive root.
  • Authentication uses Google Sign-In (same account used for Firebase Auth).
  • Survives app uninstall since files are on Google’s servers.

Setup is similar: go to Settings > Backup & Restore > Backup Destinations > Add > Google Drive and authenticate with your Google account.