I'd like to move from Vagrant to Docker containers when developing plone sites. Each of our production sites are backed up using the bin/backup command each night with the backup files uploaded to a backup server.
My old rutine for working on older sites was to grab the backup files (blobs and backups) and restore in a Vagrant VM. I'd like to loose a little of that overhead (and also try out docker more), but can't get my head around how I would go about restoring the backups into a docker container without having to rebuild a completely new image for each site.
Any pointers would be greatly appreciated
There are 2 options here:
- You either put your filestorage and blobstorage on host and mount them within container at /data/filestorage and /data/blobstorage
- Or use data-only containers and let Docker manage the storage and permissions:
command: ['chown', '-R', '500:500', '/data']
See more Where to Store Data
The thing is though this requires me getting a copy of the blobstorage files and the filestorage files. bin/backup does not give me that.
bin/backup gives me var/blobstoragebackups and var/backups and these are not ready to run files so I have to import them.
I could use snapshotbackups but these can in some cases take of almost all the space I have on the production server.
Found a way to extract the data.fs file from my backup.
Installed Plone via pip install plone in a virtualenv. That gave me the repozo tool so I could get the data file out and then use the recipes you listed above.
But you already have the repozo tool within Plone Docker image. Thus, all you need to do is:
docker run --rm \
-v /var/local/backup:/data/backup \
bin/repozo -r /data/backup/ --recover -o /data/filestorage/Data.fs