SOLVED portainer container data migration to nfs share while maintaining ownership & permissions

theomolenaar

Dabbler
Joined
Jun 12, 2016
Messages
43
A few days ago I watched this video about moving portainer data to a persistent volume. In this case NFS. Good idea!! I selected the ombi container for testing. See pictues for some settings I used when following the video.
Screenshot 2022-09-15 at 17.18.08.png

I created a test container that I could use for copying (migrating) the local ombi containter data to the ombi nfs share. See volume mapping below.

Screenshot 2022-09-15 at 17.32.39.png

The NFS share settings in Truenas:

Screenshot 2022-09-16 at 01.53.04.png

Under hosts I have all the client that I want to have access to this share. One of the hosts ip addresses is the ip of the server where portainer is running on ;-)

Now back to the test container.
Inside this test container I opened the CLI and cd into the config directory:
Screenshot 2022-09-16 at 00.58.06.png

As you can see the 'NFS share folder' config-migrate is accessible from inside this container so I should be able to copy the config directory (with the files and folders inside) while maintaining permissions. This is the command I used:
cp -r config/* config-migrate/. This command didn't transfer the permissions. Running cp -ra config/* config-migrate/ didn't work either. As you can see.
Screenshot 2022-09-16 at 01.07.20.png


Any ideas what to do next?
 

Attachments

  • Screenshot 2022-09-15 at 17.18.08.png
    Screenshot 2022-09-15 at 17.18.08.png
    809.4 KB · Views: 81
  • Screenshot 2022-09-15 at 17.16.21.png
    Screenshot 2022-09-15 at 17.16.21.png
    75.9 KB · Views: 79
  • Screenshot 2022-09-16 at 00.38.27.png
    Screenshot 2022-09-16 at 00.38.27.png
    46 KB · Views: 73
Last edited:

theomolenaar

Dabbler
Joined
Jun 12, 2016
Messages
43
Made some progress. I found a command that keeps the ownership and permissions of all files and folders.
Stop container before migrating/copying
sudo docker stop ombi
Go into the folder where the container data is.
cd /mnt/pool1/vm/appdata/ombi

Copy the contents of the ombi folder and keep the ownership and permissions:
tar cpf - . | (ssh root@192.168.x.x "cd /mnt/pool1/nfs/docker-volumes/ombi-data; tar xpf -")

The only problem that needs fixing is that the container log shows errors when running:
Code:
[custom-init] No custom services found, skipping...
[migrations] started
[migrations] no migrations found


-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/




Brought to you by linuxserver.io
-------------------------------------


To support the app dev(s) visit:
Ombi - Patreon: https://patreon.com/tidusjar
Ombi - PayPal: https://paypal.me/PlexRequestsNet


To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------


User uid:    0
User gid:    0
-------------------------------------


chown: changing ownership of '/config': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys/key-76b3a3e0-df42-4fe6-97a2-8aa2fde53f63.xml': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys/key-0a00d347-84bd-48b8-81af-325b517334be.xml': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys/key-20cc966f-4ae0-4da0-8a2a-4b4cdb382573.xml': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys/key-b97c41ec-97df-41c6-a263-9c120f6f91b2.xml': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys/key-464d9236-5bcf-49ee-8e2f-cc2fcabac819.xml': Invalid argument
chown: changing ownership of '/config/.aspnet/DataProtection-Keys': Invalid argument
chown: changing ownership of '/config/.aspnet': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls/1001acf7.34f37a15.crl': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls/c06d5c68.e6c53df1.crl': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls/c06d5c68.c122ef8b.crl': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls/c06d5c68.8ea98382.crl': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls/c06d5c68.a144cec9.crl': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography/crls': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx/cryptography': Invalid argument
chown: changing ownership of '/config/.dotnet/corefx': Invalid argument
chown: changing ownership of '/config/.dotnet': Invalid argument
chown: changing ownership of '/config/config/.aspnet/DataProtection-Keys/key-df4bc0bf-0b2f-4b00-880a-e1179300933e.xml': Invalid argument
chown: changing ownership of '/config/config/.aspnet/DataProtection-Keys': Invalid argument
chown: changing ownership of '/config/config/.aspnet': Invalid argument
chown: changing ownership of '/config/config/Logs/log-20220915.txt': Invalid argument
chown: changing ownership of '/config/config/Logs': Invalid argument
chown: changing ownership of '/config/config/OmbiExternal.db': Invalid argument
chown: changing ownership of '/config/config/OmbiSettings.db': Invalid argument
chown: changing ownership of '/config/config/Ombi.db': Invalid argument
chown: changing ownership of '/config/config/test.txt': Invalid argument
chown: changing ownership of '/config/config': Invalid argument
chown: changing ownership of '/config/custom-cont-init.d.pZwm0RwH': Invalid argument
chown: changing ownership of '/config/custom-services.d.pZwm0RwH': Invalid argument
chown: changing ownership of '/config/OmbiExternal.db': Invalid argument
chown: changing ownership of '/config/Logs/log-20220829.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220820.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220904.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220903.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220827.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220815.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220912.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220831.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220902.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220826.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220821.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220905.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220828.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220830.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220914.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220913.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220910.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220819.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220817.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220822.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220906.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220901.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220825.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220908.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220911.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220909.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220824.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220823.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220907.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220816.txt': Invalid argument
chown: changing ownership of '/config/Logs/log-20220818.txt': Invalid argument
chown: changing ownership of '/config/Logs': Invalid argument
chown: changing ownership of '/config/OmbiSettings.db': Invalid argument
chown: changing ownership of '/config/Ombi.db': Invalid argument
chown: changing ownership of '/config': Invalid argument
s6-rc: warning: unable to start service init-ombi: command exited 1
 

theomolenaar

Dabbler
Joined
Jun 12, 2016
Messages
43
Top