Configuring Backups
Open Settings → Backup in the dashboard. Choose a destination, set a schedule, and save.Local or Network Path
Writes archives to a directory on the server’s filesystem. Use this for air-gapped deployments or when you back up to an NFS mount. When running in Docker, mount a dedicated volume for backups so they survive independently of the data volume:/backups in the dashboard.
S3
Works with AWS S3 and any S3-compatible store such as MinIO or Ceph.
The secret key is stored encrypted in the local database.
Schedule and Retention
Pick a preset (daily, every 6 hours, weekly) or enter a custom cron expression. Retention keeps the newest N archives and prunes older ones automatically; choose Keep all to retain everything. If an indexing job is running when a scheduled backup fires, the backup still completes, but that one library may be only partially indexed. Schedule backups for quiet hours, or simply re-index that library after a restore.Running a Backup Manually
Click Back up now in the dashboard, or call the API:Restoring
Restore a backup from the dashboard (for local backups) or with the offline CLI (for S3 backups, scripted recovery, or a fresh machine). In every case the restore never deletes your current data. It moves the existing database, vector index, and encryption key into apre-restore-<timestamp> directory inside the data volume, so you can roll back. Delete that directory once you’ve verified the restore.
A backup created by a newer Context7 version cannot be restored into an older installation; the restore tool will refuse and tell you to upgrade first. Backups from older versions restore fine, and the database is migrated automatically the next time the server starts.
From the dashboard
Open Settings → Backup, find the backup in the list, and click the restore icon. Context7 validates the archive, shows what it contains (created date, libraries, schema version), and asks you to confirm. It then stages the restore and restarts to apply it, because the live database and vector index cannot be swapped while the server is running. Under Docker or Kubernetes the server comes back automatically; otherwise start it again after it stops.Offline with the CLI
Run the CLI with the server stopped. For S3 backups, download the archive to the machine first.Docker
Kubernetes
Scale the StatefulSet down, run the restore in a one-off pod that mounts the same PVC, then scale back up:kubectl cp to place the archive on the volume first if it isn’t there already.
Running locally
If you run Context7 without Docker:--yes to skip the prompt in scripts.
Disaster Recovery Checklist
- Deploy a fresh Context7 instance on the new machine (same or newer version).
- Don’t run the setup wizard. Stop the server instead.
- Copy your latest backup archive onto the machine.
- Run the restore as shown above.
- Start the server. Your configuration, credentials, users, indexed libraries, and search index are all back.