[IMPLEMENTED] Restore Backup (BETA) filesystem file location

Hi,

Been using the restore backup feature quite frequently the last couple of weeks. It has been working great most of the time.

One thing that I’m lacking however is the possibility to choose or select a backup.zip file directly from my windows file system. Would be great if this could be implemented in the future.

Good point.

Btw: I am a little “afraid” about the “most of the time” thing :smiley:

Well, I’m not really sure what happened but today it gave me some errors, it couldn’t restore some objects… no idea why… don’t have the logs either because I completely pruned all my containers and images so started fresh… but I will gather logs next time if I see the error again.

Or just send me the backup :wink:

Another thing I noticed was that after I restored a backup.zip file with a very simple app with one schema, two schemas from another app showed up in list of schemas… these scehemas are totally irrelevant for that second app… and when clicking on the “ghost” schemas I was presented with a 404 or something like that…

I wanted to delete them but couldn’t… tried refreshing my browser but that didn’t help… thought it might be some cache related issue or something…

Okay, this sounds strange, but there is no cache in Squidex either.

I would if I could but just deleted them because my environment was a mess and now I’m starting from scratch.

I will create the same schema now and maybe I will have to restore it if I need to restart docker for windows… then I can test this again and let you know.

OT: Btw, it doesn’t seem possible to mount a windows volume for mongo due to some file system incompatilibites… was just wondering if you’ve tried getting this to work?

Basically what I’m talking about is this:

https://hub.docker.com/_/mongo

WARNING (Windows & OS X): The default Docker setup on Windows and OS X uses a VirtualBox VM to host the Docker daemon. Unfortunately, the mechanism VirtualBox uses to share folders between the host system and the Docker container is not compatible with the memory mapped files used by MongoDB (see vbox bug, docs.mongodb.org and related jira.mongodb.org bug). This means that it is not possible to run a MongoDB container with the data directory mapped to the host.

No, sorry, I do not use Docker for Windows in production and in my local dev environment I don’t care if I loose everything.

okay, yeah, me neither until now when I need the mongo data to persist whenever I restart docker for windows :stuck_out_tongue:

That’s why I’ve been using Restore backup so much lol

(BTW - all of the above is regarding my dev environment. In production I would obviously not play around with the restore feature that much :p)

I restart docker all the time on my machine because it does not work properly after my PC went to sleep mode. I never loose data in this case.

hmm

I use docker-compose-noproxy.yml and spin up the two containers… but then when I restart my PC the mongo data is gone… how have you setup your config so that it persist?

I use this file: https://github.com/Squidex/squidex-docker/blob/master/dependencies/docker-compose.yml

hmm okay?

So what does this image do -> image: eventstore/eventstore never seen it before, I think…

I use squidex:dev

And I use https://github.com/Squidex/squidex-docker/blob/master/standalone/docker-compose-noproxy.yml

It is https://eventstore.org/

An alternative event store implementation which can be used instead of Mongo.

Interesting… didn’t know about it…

So can I use this one instead for my dev environment??

This one = this docker-compose file? Sure.

Eventstore is only used for event sourcing, it was basically a test to provde the quality of the IEventStore abstraction. With only one implementation it is always hard to tell if an interface is good or not.

I pushed a quickfix so that you can also use a file url, e.g. file://C:/Users/mail2/Downloads/Backup.zip

Cool, I will try this, as soon as I can continue from my other issue I have now (see new submitted bug).

For reference:

Fixed my persistence issue.

The fix:

Change volumes to:

volumes:
  - /data/db

From the docker docs:

SHORT SYNTAX
Optionally specify a path on the host machine (HOST:CONTAINER), or an access mode (HOST:CONTAINER:ro).

You can mount a relative path on the host, that expands relative to the directory of the Compose configuration file being used. Relative paths should always begin with . or ...

volumes:
  # Just specify a path and let the Engine create a volume
  - /var/lib/mysql

  # Specify an absolute path mapping
  - /opt/data:/var/lib/mysql

  # Path on the host, relative to the Compose file
  - ./cache:/tmp/cache

  # User-relative path
  - ~/configs:/etc/configs/:ro

  # Named volume
  - datavolume:/var/lib/mysql

So I went with the “Just specify a path and let the Engine create a volume”.

1 Like