huly-selfhost icon indicating copy to clipboard operation
huly-selfhost copied to clipboard

Backups & Restore process for v0.7?

Open Mystical-17 opened this issue 2 months ago • 5 comments

Hi, this is a bit of a inquiry and a feature request I guess. (note: environment I run Huly in is self-hosted locally in a docker container with locally mounted volumes)

  1. What is the go-to method to create a backup and be able to restore it between different 0.7 versions? I see on this migration page it shows steps for users on 0.6 how they can migrate with a command: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md

Is there a known command to create a backup for users already on 0.7 since things have changed such as MongoDB no longer in 0.7? Then what would the command be to do a restore as well? I mainly want to make sure I can safely backup my data before corruption happens or when a new version comes out I realize I no longer have the required files for a backup.

Right now I have the 5 volumes also locally mounted: certs, database, files, elastic, and panda. Would just zipping these up be sufficient to do a restore or are there other files such as the config and secret keys needing to also be backed up when I upgrade or do a new docker build.

  1. Right now it appears we can only do manual backups and documentation to do such backups seems scarce. Will future releases offer a more streamlined and user-friendly automated method for system backups and restore? For example I really like YouTrack's backup system. I can schedule periodic backups, how many to keep, and their frequency all within the app. Even better when I upgrade to a new version the setup process allows me to find the zip folder and it will do the rest on a restore:
Image

Mystical-17 avatar Oct 24 '25 21:10 Mystical-17

Hi, you need backup only cockroach and minIO for migration and restore platform. I check it. It's work for me.

ivan19911502 avatar Oct 28 '25 12:10 ivan19911502

We have backup tool that performs backup of objects in database in storage in our internal format. But you can backup/restore only cockroach and minIO, it will work as well.

aonnikov avatar Oct 28 '25 13:10 aonnikov

Thanks both!

Just to confirm the volume called 'files' would be the miniIO folder volume? 'VOLUME_FILES_PATH='

(I assume it is as I see a sub folder in it called '.minio.sys' but just double checking.

Mystical-17 avatar Oct 28 '25 18:10 Mystical-17

Yes, exactly. And that's another option - if you know the folder where you keep your db/files, you can backup these folders.

aonnikov avatar Oct 29 '25 08:10 aonnikov

Hi!

We updated to v7 from v6 without migrating to cockroach, instead we set PROCEED_V7_MONGO=true. How can we update to cockroach? When running the command from MIGRATION.md we get this error:

Error: Workspace not found
    at getTransactorEndpoint (/usr/src/app/bundle.js:102245:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /usr/src/app/bundle.js:326767:28
    at async withAccountDatabase (/usr/src/app/bundle.js:326147:7)
    at async _Command.<anonymous> (/usr/src/app/bundle.js:326759:7)

using this command:

docker run \
    --network "dokploy-network" \
    -e SERVER_SECRET="XXX" \
    -e TRANSACTOR_URL="ws://transactor:3333" \
    -e STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin" \
    -e ACCOUNT_DB_URL="mongodb://mongodb:27017" \
    -e ACCOUNTS_URL="http://account:3000" \
    -e DB_URL="mongodb://mongodb:27017" \
    -v ./backup-all:/huly-backup \
    -it hardcoreeng/tool:v0.6.504 \
    -- bundle.js backup-all-to-dir /backup \
    --internal true \
    --blobLimit 4096

We already used hardcoreeng/backup service, which generates a backup every day on our S3. Is there a way to restore this backup after migrating to cockroach db?

mbpictures avatar Nov 03 '25 11:11 mbpictures