Skip to content

Backups

Grigory Efimov edited this page Jun 6, 2025 · 2 revisions

All data is stored in the folder STORAGE_DIR="./storage".
It is sufficient to set up a backup of the data in this folder.
It is recommended to stop the environment during the backup.

Here is an example backup script:

make stop
rsync -a ./storage/ /backup/$(date +%Y%m%d-%H%M%S)/
make start

Restoring backup

to a new self-hosted server

git clone https://github.com/anyproto/any-sync-dockercompose.git
cd any-sync-dockercompose
echo 'EXTERNAL_LISTEN_HOSTS=<NEW SERVER HOST OR IP>' > .env.override
cp -rp path/to/backup/storage ./storage
chown -R <your current user> ./storage/
make start

on an existing self-hosted server

cd any-sync-dockercompose
make stop
mv ./storage ./storage_old
cp -rp path/to/backup/storage ./storage
make start
Clone this wiki locally