Backup AYON database/settings

Another question.

How do we backup or even transfer the Ayon database/settings.
i couldn’t find anything in the docs

We’re setting up our server soon with Ayon etc.
But i would like to have an autobackup of the database to another location, so in worst case scenario the server would die, we can load it in on another one.

(preffered we’ve a redundant server with autoswitching etc etc etc, but this is something for next year)

As far as I know, it’s possible to dump the entire database using pg_dump utility in the postgres container.
then for restoring from a backup, you just start the postgres container first on a fresh instance (without server) and use the same method as for restoring projects:

docker compose exec -T postgres psql -U ayon ayon < yourbackupfile.sql
1 Like

Quoted from AYON monthly beginner’s topic - December‘23 | Back up Ayon DB

Maybe @martin.wacker can add more insights.

2 Likes

Yep. I use this daily. But I cannot guarantee the redirect will work properly on Windows - they tend to misbehave and try to buffer everything which may be a problem in case of huge dumps - if that ever happens to you, please let me know and we’ll find a workaround

1 Like
  • run
    docker compose exec postgres pg_dump -U ayon > backup.sql

This errors out with:

no configuration file provided: not found
This saves an emtpy file in the directory where you run it.

You should update the guide how to properly do this:
Navigate to your ayon docker folder on disk, then run this command.

Users like who didint drink coffe in the morning could get easily a gray hair :slight_smile:

Also mentions to if you have your own postgres you dont need docker compose part. :slight_smile:

@BigRoy has cool GH notes about Backup the Database. you might would like to check it.

Tip of the day, These commands should be run in ayon-docker path and make sure you have enough permissions, maybe do it with sudo :fist: .

Hello fellow Ayoneers,

I hope it’s OK I bumped this thread back up from its dormant state. I just transferred the DB from one Ayon instance into another and it seemed to be working fine, thank you.
I would like to know what happens to bundles and bundle settings, are those copied over? (I didn’t get the bundles when restoring the DB)
The addons and dependency packages are there because I copied both the addons and the storage folder, so that’s good.

Thank you!