[GH-ISSUE #8229] How to backup and restore from a local host #3669

Open
opened 2026-03-23 21:32:19 +00:00 by mirror · 5 comments
Owner

Originally created by @sunilnc on GitHub (Sep 17, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8229

Originally assigned to: @khorshuheng on GitHub.

I'm hosting AppFlowy locally on my Ubuntu server and exposing it through a Cloudflare tunnel.

Is there any guidance on how to create a backup and do a restore in the event of a disaster?

Originally created by @sunilnc on GitHub (Sep 17, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8229 Originally assigned to: @khorshuheng on GitHub. I'm hosting AppFlowy locally on my Ubuntu server and exposing it through a Cloudflare tunnel. Is there any guidance on how to create a backup and do a restore in the event of a disaster?
Author
Owner

@khorshuheng commented on GitHub (Sep 18, 2025):

The data is stored entirely within postgres, and also Minio/S3. So you can perform a backup on the data in those storage.

The other way, would be to use Backup Workspace function under Manage Data in settings. Then import the exported files in the event of disaster.

<!-- gh-comment-id:3305221153 --> @khorshuheng commented on GitHub (Sep 18, 2025): The data is stored entirely within postgres, and also Minio/S3. So you can perform a backup on the data in those storage. The other way, would be to use `Backup Workspace` function under `Manage Data` in settings. Then import the exported files in the event of disaster.
Author
Owner

@sunilnc commented on GitHub (Sep 18, 2025):

@khorshuheng thanks for your feedback.

The data is stored entirely within postgres, and also Minio/S3. So you can perform a backup on the data in those storage.

So I ran the following commands:

docker compose down
mkdir -p ~/appflowy_backup
docker exec -t appflowy-db pg_dump -U appflowy > ~/appflowy_backup/appflowy_backup.sql
cp -r /var/lib/docker/volumes/appflowy_files/_data ~/appflowy_backup/files

This created a couple of files:
postgres_volume_2025-09-16.tar.gz
minio_volume_2025-09-16.tar.gz

I then made some changes and then I tried to restore these to see it worked using the following commands:

sudo tar -xzf ~/appflowy_backup/postgres_volume_2025-09-16.tar.gz -C "$POSTGRES_MP" --same-owner
sudo tar -xzf ~/appflowy_backup/minio_volume_2025-09-16.tar.gz    -C "$MINIO_MP"    --same-owner
docker compose up -d

However, my previous changes didn't come back.

What would you recommend I change?


The other way, would be to use Backup Workspace function under Manage Data in settings. Then import the exported files in the event of disaster.

So I did this too, but the downloads were way too small. I had uploaded a 6MB file, whereas the export was only about 200Kb.

<!-- gh-comment-id:3308373093 --> @sunilnc commented on GitHub (Sep 18, 2025): @khorshuheng thanks for your feedback. > The data is stored entirely within postgres, and also Minio/S3. So you can perform a backup on the data in those storage. So I ran the following commands: ``` docker compose down mkdir -p ~/appflowy_backup docker exec -t appflowy-db pg_dump -U appflowy > ~/appflowy_backup/appflowy_backup.sql cp -r /var/lib/docker/volumes/appflowy_files/_data ~/appflowy_backup/files ``` This created a couple of files: postgres_volume_2025-09-16.tar.gz minio_volume_2025-09-16.tar.gz I then made some changes and then I tried to restore these to see it worked using the following commands: ``` sudo tar -xzf ~/appflowy_backup/postgres_volume_2025-09-16.tar.gz -C "$POSTGRES_MP" --same-owner sudo tar -xzf ~/appflowy_backup/minio_volume_2025-09-16.tar.gz -C "$MINIO_MP" --same-owner docker compose up -d ``` However, my previous changes didn't come back. What would you recommend I change? --------------------------------------------------------------------------- > The other way, would be to use Backup Workspace function under Manage Data in settings. Then import the exported files in the event of disaster. So I did this too, but the downloads were way too small. I had uploaded a 6MB file, whereas the export was only about 200Kb.
Author
Owner

@LucasXu0 commented on GitHub (Sep 19, 2025):

So I did this too, but the downloads were way too small. I had uploaded a 6MB file, whereas the export was only about 200Kb.

Can you please check if your uploaded files are already stored on your server?

<!-- gh-comment-id:3310286900 --> @LucasXu0 commented on GitHub (Sep 19, 2025): > So I did this too, but the downloads were way too small. I had uploaded a 6MB file, whereas the export was only about 200Kb. Can you please check if your uploaded files are already stored on your server?
Author
Owner

@sunilnc commented on GitHub (Sep 23, 2025):

@LucasXu0 how do I check?

<!-- gh-comment-id:3322786930 --> @sunilnc commented on GitHub (Sep 23, 2025): @LucasXu0 how do I check?
Author
Owner

@sunilnc commented on GitHub (Sep 24, 2025):

@LucasXu0, ok, so I managed to check, and I can see that the workspace downloads are correctly sized, i.e. I uploaded a large image, and I can see the zip file reflects the increase.

However, when I try to restore the backup via the import feature, I get the following error message. Any ideas?

Image
<!-- gh-comment-id:3330655783 --> @sunilnc commented on GitHub (Sep 24, 2025): @LucasXu0, ok, so I managed to check, and I can see that the workspace downloads are correctly sized, i.e. I uploaded a large image, and I can see the zip file reflects the increase. However, when I try to restore the backup via the import feature, I get the following error message. Any ideas? <img width="1182" height="816" alt="Image" src="https://github.com/user-attachments/assets/7dc4408f-c42e-4b69-a6fe-3382f92f3e3a" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3669
No description provided.