How to transfer data to the new container, without loss?

Hello! The crux of the matter the following. I have a container with Nextcloud, data and database into separate "hosts".
Database (postgres), storage connected via nfs. Released the official container Nextcloud. Not get it to run on the existing data and database.
A new container launch point it at the previously used directory (previous) and pass when running the image in the variables DB.

I do not understand where the error is to look for a container is running, do not fall off. Go inside the directory container inside of it mounted directly on FreeBSD, but the APP is not responding ?
Also check inside the container variable BD base faithful.

At the start of the container is not created config. I manually copy the hands and rule the needs.
What could be the problem ? In the Kakko way to dig as sedebit error ?

docker logs container - nothing useful shows.
June 8th 19 at 19:33
1 answer
June 8th 19 at 19:35
Solution
If the data is stored outside the container, then when you restart everything should staff start.
When you restart the old container start happening correctly?
If so, then it is likely to different the guts of the new container. Therefore it is necessary to compare the contents of the Dockerfile, entrypoint.sh old and new containers.
If when you restart the old version of the container you have problems, most likely disconnected or connected otherwise the resource is where you store external container data.
Thanks for the replies. But the idea I can start a new, official container and transfer the dB connection and data ? and copy the data .Should work ? - ceasar.Buckridge commented on June 8th 19 at 19:56
Thank you. When you restart the old container starts. If you are bringing a new container to the old folder, the app doesn't work. Also, if the new container only slip data and the new does not start.
I do not understand what the correct procedure should be ? All separately, the data of the database. But with the official start of the container the app is not working. - ceasar.Buckridge commented on June 8th 19 at 19:38
1 In a test environment a new container starts right?
2 In the description (if any) to the new container there is no requirement for different versions of base? The case when the container contains a different version of the database, which doesn't work with data created in the old version. This was in the transition from PostgreSQL 9.6 10. - dena.Homeni commented on June 8th 19 at 19:41
Database separately, the server is only for her! - ceasar.Buckridge commented on June 8th 19 at 19:44
Then understand that a new screw in the container. - dena.Homeni commented on June 8th 19 at 19:47
I don't quite understand. I also only data transfer. Given that they are on another host, exactly the same as the database. And the official container , when the direct directory on my data does not start and does not create config.php

Where to dig XS... - ceasar.Buckridge commented on June 8th 19 at 19:50
Where to dig XS...
I even more difficult. Do not imagine your architecture, how it works and what it is. So I can only give General advice. Although it can be banal the access rights (by the way, tested?) or something that lies on the surface right in front of your nose. - dena.Homeni commented on June 8th 19 at 19:53
But the idea I can start a new, official container and transfer the dB connection and data ? and copy the data .
Docker works without saving its internal state after a restart - I restartovat container, and it is a stitch unlike new path. This is to ensure that in the container the idea is that it is not necessary to copy the data. There is an application that receives, processes within, and gives the resulting data. In your case it looks like a incompatibility in the work ON the new container and the old database.
Ran the problem container in debug mode? At what step it crashes? How is the dB connection data in the old container? - dena.Homeni commented on June 8th 19 at 19:59
Rights checked, put the same as on the original image. The container is in status "UP".
When you start not created config.php

I do not understand how to track it, what is stopping when you start the container, generate it. - ceasar.Buckridge commented on June 8th 19 at 20:02
Vryatli with the base. Since I'm a new container as well as connect to the old database on another host. As well as the old, except that the new create another database for the test. - ceasar.Buckridge commented on June 8th 19 at 20:05
When you start not created config.php
Usually these things catch up to the container during its Assembly /instructions COPY or ADD/, but not generated at the start. If you run the old container and connect to it, there will be this file? Similarly with the new. - dena.Homeni commented on June 8th 19 at 20:08
Got to the launch. Gave him the old base. The application has started and when you enter uchetom swears that cannot create user, table is duplicated.

5a70794b59bfa359989936.jpeg - ceasar.Buckridge commented on June 8th 19 at 20:11
cannot create user, table is duplicated.
During the launch container runs the command/script the table creation.
It is after the abuse stops? Or ochuhivaetsya and works on? - dena.Homeni commented on June 8th 19 at 20:14
Working on, but I have to slip the old database to maintain. Is it possible ? - ceasar.Buckridge commented on June 8th 19 at 20:17
How to happen the interactions between the external base and the application in the container? - dena.Homeni commented on June 8th 19 at 20:20
Create a new directory on the host.To create a new one. DB. Slip the old data. To start the container. - ceasar.Buckridge commented on June 8th 19 at 20:23

Find more questions by tags Ubuntu ServerDockerSystem administrationLinux