Automating restore from backup archive

Hello YouTrack Team,

Currently, restoring a backup in YouTrack requires some manual interaction via the UI — specifically, selecting the backup archive in the Configuration Wizard and running the restore process.

Is it technically possible to bypass the UI step by extracting the backup archive directly into the YouTrack home/data directory (e.g., via shell script) and starting the service, thereby restoring the instance to the exact state of that backup?

Our goal is to fully automate the restore procedure in a headless environment, without requiring UI interaction. Would such an approach be supported, or is it considered unsafe / not recommended?

Thank you,

0
6 comments
Official comment

Hi Abdul. YouTrack Server is currently distributed as a Docker image. You can skip the web-based Configuration Wizard and directly upgrade by running the new container with the same volume mapping. This setup will require adding a special starting parameter: -Ddisable.configuration.wizard.on.upgrade=true

For a step-by-step guide, feel free to check the following article: Upgrade a Docker Installation.

Hi Stanislav,

Thank you for your speedy response. Just to clarify: does this mean I should manually unpack the backup archive into the YouTrack home/data directory, then start the container with the -Ddisable.configuration.wizard.on.upgrade=true parameter, and YouTrack will start up normally from that state?

Best regards,

Abdul

0

Hi Abdul, this method does not require creating and unarchiving the backup. Provided you are already using Docker, you only need to map the new container (with the newer version) to the same folders that your earlier container had been mapped to. For this to work, the said parameter needs to be applied. The exact set of steps is described in the article, so I suggest reviewing it and following the steps closely.

If you don't use Docker yet, you can switch to Docker first by restoring your data via the backup archive and the web configuration wizard. Later upgrades can be made using this wizardless method.

0

Hi Stanislav, thank you for clarifying. Just to confirm - in the case where the YouTrack home directory is completely empty (e.g., after a disaster recovery or on a fresh environment), is it supported to restore directly from a backup archive without using the web wizard?

In other words, can we provide the backup archive to the container (instead of pre-populated volumes), skip the wizard with -Ddisable.configuration.wizard.on.upgrade=true, and have YouTrack initialize itself from that archive automatically? Or is the web wizard still required at least once to unpack the backup archive?

The main difference here is that we are not attempting an upgrade at all, we are just attempting to restore from the backup on an empty youtrack.

Best regards,

Abdul

0

Hi Abdul,

This upgrade type (without the web UI) requires folders to contain actual data and not a backup archive. The process is currently documented for Docker only, and that is the recommended way to perform this type of an upgrade or data restore.

You may be able to unarchive the backup and start the instance this way by mapping the container to the unarchived folders, but this approach has not been thoroughly tested, so we do not recommend it. If you have an archive to restore data from, the recommended approach is using the web UI and selecting the backup archive via the Upgrade option.

0

Hi Stanislav, thank you very much for your reply. I think this answers my question for now. 

Best, abdul

0

Please sign in to leave a comment.