Hello,
I've installed the Alfresco community version service just by docker-compose up months ago.
Several days ago, after doing docker-compose up, I stupidly did docker-compose down instead of the docker-compose stop just for stopping the service. And when I restart the service, I can't log in my account though the login page(localhost:8080/share) is working. And localhost:8080 alert an error:
"Cannot find Alfresco Repository on this server. (Does this application have access to alfresco-global.properties? Does this application have cross-context permissions?)"
I deployed alfresco by docker on another Ubuntu server through VMware, and I use docker ps, the docker services running are the same as the physical computer. But the physical one alerts that error.
I did docker-compose down on the virtual Ubuntu, and the files I uploaded on alfresco just disappear when I restart it.
I wonder if my data will be deleted after docker-compose down. If not, how can I recover them?
Still waiting for helping. Thanks.
It's not easy to understand what's happening there.
docker-compose down does not remove any data from your Docker Volumes, the information still should be present there.
I suggest you to inspect the logs and the volumes in order to gather additional hints on the problem.
@angelborroy wrote:It's not easy to understand what's happening there.
docker-compose down does not remove any data from your Docker Volumes, the information still should be present there.
I suggest you to inspect the logs and the volumes in order to gather additional hints on the problem.
Thank you so much.
I tried to execute docker-compose down on another computer and I found that container, overlay2, network, and volumes folders which under /var/lib/docker had been changed their last modified date, some subfolders are deleted.
Then I did docker ps -a, it shows the alfresco service has gone. (I searched Docker documentation, It seems that because of the docker-compose down would delete the containers and network folders)
When I did docker-compose up -d to start alfresco service at this time, It seems a new alfresco service had been built, what I had uploaded on the last alfresco has been gone.
I think this alert Cannot find Alfresco Repository should be due to the subfolders having been deleted.
I tried to back up the folders before executing docker-compose down, and restore them after doing docker-compose down. Then restart docker service, and docker-compose up, It seems the data could be recovered.
I wonder if I could just use disk tools to recover these folders to get the service work as before?
Here is my alfresco log. But I can't understand them immediately, It seems that springframework was been corrupted?
The log file contains too many characters, can't paste them all in this reply. So I post them as photos.
@addon0 wrote:...
I did docker-compose down on the virtual Ubuntu, and the files I uploaded on alfresco just disappear when I restart it.
Hope Angel is right and you have a persistant volumes. Because, if you use docker-compose.yml without persistant volumes like this one, all data was stored inside containers. docker-compose down coommand remove all containters and their data. So after down/up the system will be clean.
Hope in your case data could stay in the droped docker volumes without names or trash docker folders.
Use
docker volume ls
and
docker volume inspect <VOLUME>
commands to find droped volumes from your services (containers). I never tried to do so and can't tall you it is possible to restore data in this way. Read this topic for more information. Founded folders copy to the VM and mount it as a volumes to the containers.
To make data indepandent from containers, named or persistant volumes must be used. For example, persistant volumes:
services: alfresco: ... volumes: - ./data/alf-repo-data:/usr/local/tomcat/alf_data postgres: ... volumes: - ./data/postgres-data:/var/lib/postgresql/data solr6: ... volumes: - ./data/solr-data:/opt/alfresco-search-services/data
Thanks for your reply.
Unfortunately, I just did docker-compose up command to build service, didn't realize that I need to persistent volumes before. I checked the .yml file, and it didn't define the volume path.
I had recovered some deleted files using disk tools these days, but the service still didn't start up as I wish. And it seems because of symbolic links under /var/lib/docker/overlay2 or something else.
@fedorow wrote:
...Because, if you use docker-compose.yml without persistant volumes like this one, all data was stored inside containers.
I just noticed that you mentioned if I didn't have persistent volumes in docker-compose.yml then that all data would be stored inside containers. Did you mean that all data was stored under /var/lib/docker/containers folder?
After docker-compose down, I found that containers, overlay2, images folders had changed their modified date. So I wonder if I could just restore these folders, then the service could work as before?
I'm not said it is possible, only expressed some hope and the direction to investigate.
Unfortunately looks like this is the end. Is it possible to undo docker rm CONTAINER?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.