You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Yes. For some docker compose project I'd like to backup some host-bind data directories. They are not docker volumes, just files in the same directory as docker-compose.yml file. Before running the backup, the containers must be stopped (to prevent them from writing to the files being backed up), so the before hook is a good place to handle this logic.
But after reading and testing, it turns out autorestic does not expose the path of backup location to hooks, we can only get the location name, which is not very helpful in this case.
For example, a simple docker compose project is at /opt/myproject:
A possible workaround would be to use cd /opt/${AUTORESTIC_LOCATION_NAME} && docker compose stop as the before hook. But I've got different base directories for many docker compose projects, I'd like to reuse the hooks definition with YAML anchors, so it would not need to be repeated.
Describe the solution you'd like
It would be helpful to expose AUTORESTIC_LOCATION_PATH environment variable to hooks (all the hooks).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Yes. For some docker compose project I'd like to backup some host-bind data directories. They are not docker volumes, just files in the same directory as
docker-compose.yml
file. Before running the backup, the containers must be stopped (to prevent them from writing to the files being backed up), so thebefore
hook is a good place to handle this logic.But after reading and testing, it turns out
autorestic
does not expose the path of backup location to hooks, we can only get the location name, which is not very helpful in this case.For example, a simple docker compose project is at
/opt/myproject
:And here's config file for autorestic:
A possible workaround would be to use
cd /opt/${AUTORESTIC_LOCATION_NAME} && docker compose stop
as thebefore
hook. But I've got different base directories for many docker compose projects, I'd like to reuse the hooks definition with YAML anchors, so it would not need to be repeated.Describe the solution you'd like
It would be helpful to expose
AUTORESTIC_LOCATION_PATH
environment variable to hooks (all the hooks).The text was updated successfully, but these errors were encountered: