How to backup and restore plone files and images?

I'm using Plone 5.2.1, running in docker containers. We use postgres as the database.

I would like to know how to backup and restore files and images on the site, because when I restore the backup made to the postgres database, the images and files do not appear.

How can I backup and restore Plone files and images?

If your Plone site uses Postgres it is very likely using RelStorage. Please check the documentation for Relstorage, you can configure it to store both (meta)data and blobs all in the postgresql database, but there is also a setting to store the blobs (images/files) in a separate filesystem blobstorage.

If your restored postgres db misses files an images, it's very likey they were stored in the docker container. Maybe you need to add an extra volume/bind mount to a specific path in the container to store these.

( Or you need to pass different options to the container to instruct RelStorage to store all data in Postgres, but that won't help you much in the current situation. Once you have your database and blobs 're'-synced, RelStorage has a zodbconvert script that could help you convert postgres/filesystemblobs to postgres only)

1 Like

Plone usually stores Blobs (binary large objects) like files and images in a separate blob-storage. This is located in the filesystem. Your docker container should map the location of the blobs to a permanent storage. This need to get backed up separately as all other filesystem based docker storage's.

Btw.: With RelStorage < 3 this was the same. With newer RelStorage 3.x it is recommended to store blobs in i.e. Postgres. That said there is not much experience how well this works, since v3.x is relatively new.

1 Like

Thank you guys!

Indeed, files and images are stored in blob files. We made the backup of the directory where the persistent volumes of the container will be mapped, in which there are the blobs files.