OCIS docker - Copy data directory without changing config

I am running ocis on Ubuntu server arm.

I have mounted a local data dir from OCIS container, the dir symlinks to a mounted folder coming from NAS1
I have to change the symlink from NAS1 to NAS2 without changing the rest of OCIS/reinstalling/etc.

what is the right way to copy underlying data?
NAS1 is a QNAP and NAS2 a Synology.
I tried to rsync data from NAS1 to NAS2, supported by both, but got permission errors after restarting ocis.
I tried to do cp -ap from the ubuntu server, and that as well produces permission errors.
Below an example error:

{“level”:“error”,“error”:“open
/var/lib/ocis/storage/metadata/.migrations.lock: permission denied”,“time”:“2024-03-10T13:57:08.762340012Z”,“caller”:“github.com/cs3org/reva/v2@v2.16.4-0.20231220070538-82b93f6a66bc/pkg/storage/utils/decomposedfs/decomposedfs.go:172",“message”:"could not migrate tree”

I know there is a guide stating to use rclone, but that seemed targeted at full ocis migration, while I do not want to migrate ocis, only the data directory

Anyone can explain what I am doing wrong?

I think using to instances and rclone would be the best approach.

To move data from NAS1 to NAS2 without affecting OCIS:

  1. Stop OCIS: sudo systemctl stop ocis
  2. Copy Data: Use rsync to copy with correct permissions:
    rsync -avh --preserve=all /mnt/NAS1/data/ /mnt/NAS2/data/
  3. Update Symlink:
    rm /path/to/ocis/data
    ln -s /mnt/NAS2/data /path/to/ocis/data
  4. Start OCIS: sudo systemctl start ocis

Ensure proper permissions on both NAS devices before starting.

hi all,
already tried a solution with rsync including that one, somehow did not work (both data filesystems are ext4), I resorted to just use the webui from a local machine with the mount, and leaving it run copying files in batches of a few thousands at a time.
so basically I populated from scratch the new ocis instance. I understand this is not an enterprise solution neither a nice one, but it worked for my use case.