System backup and restore

How to generate a full backup of all Arquivme accounts and how to restore it — including the risks of restoring, which is a destructive operation.

Unlike the personal backup (which each user makes of their own files), the system backup is an administrator-only feature that creates a copy of everything: all physical files from every account, plus a full dump of the main database tables.

Generating the full backup

Under Administration > System > Export backup, Arquivme builds a single .zip containing:

  • A database.json file, with the contents of the usuarios, arquivos, permissoes, logs, leituras and arquivo_tags tables.
  • An uploads/ folder, with a copy of all physical files from every account.

This process can take a considerable amount of time on installations with a lot of content — the server does not apply an execution time limit to this specific operation, but avoid interrupting it halfway.

Keep this .zip file in a safe place, outside the server itself — by definition it is an independent copy, and it does not serve that purpose if it stays on the same disk it is meant to protect.

Restoring a backup — read before using

Destructive operation

Restoring a backup completely erases the current contents of the usuarios, arquivos, permissoes, logs, leituras and arquivo_tags tables before inserting the backup data. There is no two-step confirmation beyond the one the interface itself asks for — once confirmed, it cannot be undone. Never restore a backup on a production system without being absolutely sure of what you are doing, and ideally test it first in a separate environment.

Under Administration > System > Import backup, upload the .zip generated earlier. The process:

  1. Extracts the ZIP and checks that database.json exists and is valid — if not, the restore is refused before touching any data.
  2. Erases the current contents of the six tables listed above, inside a transaction (if any part fails midway, the whole transaction is rolled back — you are not left with a half-restored database).
  3. Inserts the backup data into those same tables.
  4. Copies the physical files from the backup back to the storage folder (STORAGE_BASE), without first deleting existing physical files that are not in the backup — in other words, the disk restore is additive, but the database restore replaces everything.

What is not included in the backup/restore

The notificacoes, favoritos, login_attempts, api_rate_limits and sistema_status tables are not part of the dump. This means that, after a restore:

  • Notifications and favorites from before the backup do not come back.
  • Login attempt and request limit counters are reset (no practical impact; they recalculate on their own).

When to use each

SituationWhat to use
A user wants a copy of only their own filesPersonal backup, done by the user
Routine backup of the whole system, for disaster recovery/migrationFull backup, done by the admin, kept outside the server
Recovering from serious data lossRestore — keeping the risks above in mind
Migrating to another serverFull backup + restore on the destination

Last updated: November 29, 2026