Well, now I just did a backup and checked if it can be found outside the docker machine and it cannot.
vagrant@ubuntu-xenial:~$ sudo docker inspect -f "{{.Mounts}}" discourse
[{bind /var/discourse/shared/standalone /shared true rprivate} {bind /var/discourse/shared/standalone/log/var-log /var/log true rprivate}]
True, but I just ignored it for now. Btw that rsync was done outside of the (vagrant) machine where I ran my discourse.
But for now, as you suggested did the following:
- vagrant ssh to the machine and from inside:
- did a backup with
sudo docker exec -w /var/www/discourse -i discourse discourse backup - noticed the filepath:
Output file is in: /var/www/discourse/public/backups/default/discourse-2020-05-14-125606-v20200512064023.tar.gz - searched the whole vagrant machine for that particular file, but found nothing
find / -name discourse-2020-05-14-125606-v20200512064023.tar.gz 2>/dev/null - however if I enter the docker machine, it is there
root@ubuntu-xenial-discourse:/var/www/discourse/public/backups/default# ls discourse-2020-05-14-120436-v20200512064023.tar.gz discourse-2020-05-14-121930-v20200512064023.tar.gz discourse-2020-05-14-121710-v20200512064023.tar.gz discourse-2020-05-14-125606-v20200512064023.tar.gz
- did a backup with
So my question: if I create a backup, should I see it from outside of docker?
In the meantime I just create a vagrant machine, and git clone from inside in the standard /var/discourse directory. The only “oddness” is that I have a discourse.yml inside container, not app.yml.