Apache Casbin Gateway
5. Operations

5.3 Backups and cloud sync

Backups

A backup is a snapshot of the configuration, written beside the database rather than inside it, so it survives the database it was taken from.

Settings → Backups:

  • Turn them on, and say how often.
  • Where backups live is the directory the snapshots are written to. Point it at a folder Dropbox, OneDrive, iCloud Drive or your NAS already syncs, and every backup is uploaded as it is written.
  • The panel names the last backup and the next one, and says so when the last one failed.
  • Restore puts one back; Delete removes one.

One snapshot is also taken in front of every import (3.5), so bringing a CC Switch installation over is undoable.

Cloud sync

A copy of every backup, kept somewhere that is not this machine. Settings → Cloud sync:

TargetWorks with
WebDAVNextcloud, ownCloud, Synology, QNAP and most other NAS firmware
S3S3 itself, Cloudflare R2, Backblaze B2, MinIO, Aliyun OSS, Tencent COS

For WebDAV, most services want an app password here rather than the one you sign in with.

The snapshots are immutable files, so a sync has nothing to merge: each side ends up holding what the other had, and any of them can be restored from the list on the Backups panel.

Import and export

Settings → Import and export is the configuration as one file: what to move to another machine, and what to read back from one.

A snapshot carries the providers, the connections, the agents with their routing and permissions, the probe cases, the model prices and the settings — each a section you can leave out. Secrets is the separate tick that decides whether the credentials inside them travel too; a snapshot taken without it describes a configuration nobody can serve traffic with until the keys are typed again.

Connections restored onto another machine are written into that machine's agents with its Gateway port and program path, not the ones they were taken with.

This is the route for setting up a second machine the way this one is set up, where backups are the route for getting this machine back.

Next: 5.4 Docker and Podman.

Edit on GitHub
Apache Incubator

Apache Casbin (Incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright © 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

Apache, Apache Casbin, the names of Apache projects, and the feather logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

On this page