FWIW - I don’t know if this works on Sentry 10.x, but the steps below worked for me coming from Sentry 9.0.0.
This was indeed a bit of an unexpected nuisance, because the path which points to uploaded media differs from 9.1.2 and later versions:
First, I hope you have the old Sentry 10 around, if not it’s game over…
Copy the files from inside sentry_web
container to the local filesystem. Here’s the idea.
As user root this is what I did on Sentry 9.0.0:
mkdir ~/tmp
cd ~/tmp
docker cp sentry_web_1:/var/lib/sentry/files/ .
Since Sentry 10.0.1 seems to have its datafiles set to location: '/data/files'
, you might need to use a different path for that Docker copy command:
docker cp sentry_web_1:/data/files/ .
(Also it might be the web contrainer is named sentry_onpremise_web_1
in Sentry 10.x so you might need to change to that name.)
When the above step finished successfully, create a tarball that can be (secure) copied to the new Sentry host:
tar zcf sentry_data.tgz files/
On the NEW Sentry host unpack the tarball, using the same path /root/tmp/
.
cd /root/tmp/
tar zxf sentry_data.tgz
Now these files can be copied into one of the Sentry 21.x containers. I copied them into sentry_onpremise_worker_1
:
cd files
docker cp . sentry_onpremise_worker_1:/data/files/
docker exec -ti sentry_onpremise_web_1 bash
chown -R sentry:sentry /data/files
As said, this did the trick for me, but your mileage may vary.