caprover
caprover copied to clipboard
Not possible to restore all images
What is the problem?
I am testing a full backup/restore of caprover. The backup was automated with rsnapshot, and copies the /captain/data folder and does a pg_dumpall via docker for the data.
Steps to reproduce the problem:
I reinstalled the server put the contents of the original /captain/data in to a tar file and added a meta/backup.json that I saved from an earlier manual backup.
Following the restore instructions I did the docker run and everything seemed to work. The captain images were restored (except for monitoring which had to be reinstalled), the pg container (which was created via one click apps) was restored. my containers based on git repo's just had to be rebuilt but worked.
But I had a test image which I had created via a single captain file applied via the deploy tab:
{
"schemaVersion": 2,
"imageName": "resilio/sync:2.6.4"
}
This was not restored, I re-ran the captain file in the deploy tab, but the app won't start. docker images shows the image, but docker ps doesn't. I have tried everything except removing and re-creating the app (which would defeat the purpose of the exercise).
Answers to the following questions where applicable:
- Your OS and version? centos 8
- RAM? 64gb
Observations from the full backup/restore exercise:
The hash in the container names change after a restore, so the db backup and restore have to be reconfigured.
It would be great if the /captain/meta folder were always present on the disk so that they can be backed up with the other captain data.
docker ps shows the containers, try docker service ls do you see the container? Can you please copy and paste the row that shows the service? If the image is available on the machine and the service is up, the container should run.
Sorry, I have since deleted and recreated the containers that didn't restore. All containers created from git repos restored, all containers created from one click apps restored, only containers created from captain-definition file via the deploy tab failed to restore.
The containers created via "captain-definition file" are locally built on the server, so if they are not pushed to a remote registry, it's expected that they don't run after the backup restoration.
But if you use this type of captain-definition:
{
"schemaVersion": 2,
"imageName": "resilio/sync:2.6.4"
}
It should be fine, as it's already referring to an image to a remote registry (docker hub).
I will park this issue for now as it needs more info. If more info becomes available we can take a deeper look into this issue.