# Backup and restore Choose the backup according to what you need to recover. To copy a complete FerretDB/SQLite installation, including users and attachments, use a stopped copy of its data and settings. A board export has a smaller scope. The alternatives below collect the advice and screenshots in [Backup and Restore, issue #6683](https://github.com/wekan/wekan/issues/6683), reported by markusst1982 and explained by xet7. The screenshot shows the September 2026 interface; labels and available formats can change with releases. | Alternative | What it preserves | Guide | | --- | --- | --- | | Copy the stopped `files` directory | Local SQLite database, users, attachment records, local attachment and avatar files | [Copy to another server](#copy-a-ferretdbsqlite-installation) | | ZIP the stopped `files` directory | The same data, in a portable archive | [Archive the data directory](#archive-the-files-directory) | | ZIP the stopped installation directory | Data plus startup scripts and settings kept inside it | [Archive the whole installation](#archive-the-whole-installation) | | Admin Panel backup, now or scheduled | All application collections and selected attachment/avatar versions; see coverage limits below | [Scheduled backups](#admin-panel-backup-and-schedules) | | Admin Panel continuous backup | Every change to the database, filesystem attachments, avatars and logs within seconds, restorable to a chosen moment | [Continuous-Backup.md](Continuous-Backup.md) | | Local or remote S3-compatible storage | A destination for archives or separately backed-up objects | [Storage alternatives](#s3-compatible-and-other-storage) | | Board, list, swimlane or card export | Selected content for exchange, rather than a complete server copy | [Export and import](#export-and-import-selected-content) | | MongoDB, Snap, Docker or Sandstorm backup | Deployment-specific data and settings | [Other deployments](#other-deployments-and-older-installations) | ## Copy a FerretDB/SQLite installation Find the actual `WRITABLE_PATH` in your startup configuration. A common layout is: ```text / files/ attachments/ avatars/ db/ wekan.sqlite app/ tmp/ ``` Some installations set `WRITABLE_PATH` directly to the `files` directory, including Snap. In that case, do not append another `files`. Database names and locations can differ: check FerretDB's SQLite URL too. Copy the whole database directory, not just the example `wekan.sqlite` file. 1. Stop WeKan, FerretDB and any other processes writing to these directories. For raw SQLite copies, stopping only the web application is insufficient. 2. Copy the complete `files` directory to a separate backup location or server. Keep database files and local attachments/avatars from the same stopped copy. Also save startup scripts, environment settings and any data outside this tree. 3. Restart the source after the copy finishes successfully. 4. On the destination, keep its services stopped and preserve its existing data separately before installing the copied directory. Do not merge two raw database directories or overwrite a database while it is running. 5. Set the destination `WRITABLE_PATH`, SQLite URL, ownership and permissions for the service account. Adjust host-specific settings such as `ROOT_URL`. 6. Start FerretDB, then WeKan. Test an existing login, boards, cards, attachment downloads and avatars before using the restored installation. This copies user accounts because they are in the database. It does not copy files stored in external buckets, mounted paths outside the copied tree, or a separate MongoDB/PostgreSQL database. Back those up separately. See [FerretDB v1 with SQLite](../Databases/FerretDB/1/README.md), [attachment storage](../Features/Admin-Panel/Attachments/README.md) and [upgrade procedures](Upgrade.md). ## Archive the files directory After stopping the writers as above, run this from the parent of `files`. Choose an archive name that does not already exist: ```bash zip -r wekan-files-backup-2026-09-23.zip files unzip -t wekan-files-backup-2026-09-23.zip ``` Store the archive outside `files`, so it cannot include itself. Restart the source after archiving. To restore, extract into a separate staging directory, then follow the destination steps above. An archive integrity check confirms that the ZIP can be read; a restore test confirms that the installation works. ## Archive the whole installation If `/home/wekan` contains the data, startup scripts and settings, the issue recommends backing up that whole directory as root. Stop all writers first: ```bash cd /home sudo zip -r wekan-installation-backup-2026-09-23.zip wekan sudo unzip -t wekan-installation-backup-2026-09-23.zip ``` Restart after the archive succeeds. Use the same staged restore procedure as for `files`, and verify permissions before starting the destination. Include service definitions or configuration stored elsewhere separately. A ZIP is not a machine image and may not preserve every filesystem attribute. ## Admin Panel backup and schedules Open **Admin Panel / Attachments / Backup**. This alternative runs while WeKan is online, as described in the issue. 1. Choose **Whole instance** as a site administrator to include accounts and instance settings in the database data. An Organization backup is limited to its boards and excludes accounts, instance settings and Organization/Team records. 2. Select all three: **Attachments**, **Avatars** and **Data (text)** for a full application backup. A subset backs up only the selected categories. 3. Choose **Save to storage**: filesystem, S3/MinIO, Azure or Google Cloud Storage, with credentials configured in the corresponding storage pane. 4. Click **Backup now** and wait for completion, or choose daily, weekly or monthly scheduling, the time and day, then **Save**. Scheduling is site-wide and available to site administrators. 5. For filesystem archives, **List backups** lists the archives available to your scope. Restore can add missing entries or replace entries. Replacing instance data clears each restored collection before importing its contents. ![Admin Panel backup scope, file and data checkboxes, destination, schedule and restore controls](admin-panel-attachments-backup-schedule-and-storage.png) Screenshot source: [xet7's backup screenshot in #6683](https://github.com/wekan/wekan/issues/6683#issuecomment-5604698350). ### Did the backup work? History, health and monitoring Every backup run - scheduled or **Backup now** - is recorded in the database (collection `backupRuns`, kept 400 days), so its result survives a restart and every WeKan server or Kubernetes pod shows the same answer. The status is shown in **Admin Panel / Problems / Settings / Backup** (`/admin/problems/backup`, with a link to the backup settings) and above the schedule in **Admin Panel / Attachments / Backup**: - the time of the **last successful** instance backup, marked **overdue** when a schedule is on and no backup succeeded within its period (daily: 26 hours, weekly: 7 days + 2 hours, monthly: 31 days + 2 hours); - the **last run** and its error, when it failed; - the **next run** of the schedule; - a **history** table of the last 30 runs: when, scheduled or by whom, scope, storage, status, size, duration and error. A failed backup, or a scheduled one that is overdue, is also listed on **Admin Panel / Problems / Summary**. A run still marked running 24 hours after it started is shown as failed: its server stopped during the backup. A scheduled backup that could not start because another backup was still running is recorded as failed too, so a missed night is visible. A per-tenant administrator sees only their Organizations' runs. For monitoring, `/metrics` (see `METRICS_ACCEPTED_IP_ADDRESS`) includes: ``` wekan_backup_last_success_timestamp_seconds # 0 = never wekan_backup_last_run_timestamp_seconds wekan_backup_last_run_success # 1 or 0 wekan_backup_overdue # 1 when a scheduled backup is missing ``` Example Prometheus alert: `time() - wekan_backup_last_success_timestamp_seconds > 26*3600`. ### Keeping only recent backups `BACKUP_KEEP_DAYS=7` deletes local (filesystem) backups older than seven days after each successful backup, separately for the whole instance and for each Organization. The newest backup of each is always kept, however old, so a period of failures never leaves you without one. Unset or `0` keeps every backup, as before. Archives in S3/MinIO, Azure or Google Cloud Storage are not deleted by WeKan; use the provider's lifecycle rules. Filesystem backups are written to `/files/backup`. To keep them on NFS, SMB or another share, mount it at that path (in Kubernetes: a volume mounted at `/data/files/backup`). ### What the repaired archive includes Select **Whole instance**, **Attachments**, **Avatars** and **Data (text)** for all application database collections and every recorded attachment/avatar version. This includes accounts, settings, attachment/avatar metadata, GridFS collections and indexes. Database data uses BSON Extended JSON so binary data, ObjectIds, dates and large integers survive the round trip. File versions are read through the configured filesystem, GridFS or cloud reader and included in the archive. Restore writes their content to the destination filesystem and updates their metadata paths, so the source machine's absolute paths are not required. Selecting only a file category also includes that category's metadata. The manifest inventories the payloads and SHA-256 checksums. Restore checks all payloads before changing the destination. Missing source files, short reads, malformed archives and database write errors fail explicitly. A local archive appears in **List backups** only after it completes successfully. This repairs the older archive format, which excluded attachment/avatar database records and GridFS collections. Older archives still have those coverage gaps; upgrading the app cannot add missing content to an already-created archive. Organization archives remain restricted to their own boards and are not a full-instance backup. The online export reads collections and files sequentially; it is not an atomic snapshot of concurrent writes. For a consistent point-in-time server copy, stop writes and use the appropriate database/filesystem backup method. Operating system users, service definitions, environment variables, external identity providers and unreferenced objects in cloud buckets are outside the application archive. Keep those separately. Archives contain account credentials and configured service secrets; give them the same access protection as the database. Filesystem archives live below `files/backup/YYYY/MM/DD/