LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 11-11-2023, 06:59 PM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
Migrate a directory from a container to a native QNAP volume


I have a NextCloud container on a QNAP NAS that has already grown to almost 40 GB and will grow about 1 GB per month.
The /config directory is already on the native QNAP volume, but /data remained in the container. This was default configuration of official image.
And the /data directory takes up almost all of these 40 GB. These are mainly document files and I would like to migrate with this directory to a native partition.
The database is MariaDB in a different container (not native QNAP) also used for other containers needs.
To do this, I used Portainer installed in docker-compose.
I used the following procedure:
- backup everything possible
- creating the /share/Container/nc-data/data directory
- disabling Nextcloud and MariaDB containers
- copying the contents of /share/Container/container-station-data/lib/docker/overlay2/<nextcloud_volume>/diff/data to the created dir /share/Container/nc-data/data using cp -a
- in Portainer I click on <nextcloud-3> and then <Duplicate/edit>
- also in Portainer I add the created directory from the host, i.e. /share/Container/nc-data/data as a bind mounted in the container to /data
- I click <Writable> and <Deploy the container>
- after some time, the <Invalid port specification> message appears in the upper right part of the screen
After starting the MariaDB and NextCloud containers, everything works but with the "old" contents of the /data directory
I do not change any other values and the existing ones (volumes, network including ports, etc.) are as they should be.
Portainer shows that the new container does not have the bind that I added earlier.
What am I doing wrong?
I am attaching screenshots.
Attached Thumbnails
Click image for larger version

Name:	s1.png
Views:	6
Size:	117.8 KB
ID:	42032   Click image for larger version

Name:	s2.png
Views:	4
Size:	109.8 KB
ID:	42033   Click image for larger version

Name:	s3.png
Views:	3
Size:	123.4 KB
ID:	42034  
 
  


Reply

Tags
container, migration, nextcould, volume



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrate to other distro - how to migrate existing RAID1 karcio Linux - Software 10 03-10-2021 03:34 PM
Install non native programs as native Vpcghostlinux elementary OS 2 12-26-2017 02:58 AM
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
[SOLVED] The way to compile kernel with -mtune=native (or -march=native) kaz2100 Debian 3 08-18-2011 03:45 AM
migrate from suse, what should i migrate to? any suggestions?:twocents: Siljrath Linux - General 4 12-26-2005 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 05:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration