docker-unifi-rpi icon indicating copy to clipboard operation
docker-unifi-rpi copied to clipboard

Auto Backup Dir Env Variable in Docker-Compose.yml

Open JB09 opened this issue 5 years ago • 3 comments

Any way to add this as an environment variable per: https://help.ubnt.com/hc/en-us/articles/226218448-UniFi-How-to-Configure-Auto-Backup? Or at least can you provide me with the {data.dir}/backup/autobackup docker path so I can create a bind mount on my host?

JB09 avatar Sep 05 '19 15:09 JB09

Edit: Looking at this further in the dockerfile, it looks like the config named volume is inclusive of the backup directory, but I still think being able to define the "autobackup" directory directly would be useful for those that would like to store this data elsewhere (like a NAS) without tarballing the entire config volume.

JB09 avatar Sep 05 '19 15:09 JB09

It might be more interesting to add a commented out stanza to the docker-compose config showing how to bind mount a directory to the right place in the container. Thoughts?

ryansch avatar Oct 01 '19 17:10 ryansch

That's certainly the easiest way to handle it and is what I did to accommodate my automated backups for the time being. Just unfortunate you can't use a bind mount for a sub-directory of a named volume.

JB09 avatar Oct 01 '19 17:10 JB09