Hey Larry … many thanks for your answer & help! i do appreciate & i love the community here - everyone helps everyone. Nextcloud (and the poeple behind - it’s an incredible great product - made from great poeple).
(yes … this needs said from time to time )
i do see, you’re quite a Linux cli professional.
What i’m looking for is really for the OCC way. OCC is the common cli-api, which is not necessary in every case - but, when you find a command there, it’s most the “supported” one.
I think, it’s good to know, that Nextcloud has got also a reference from storage-path in the database. So, if one will only move the data to another data-/storage path, this could lead to issues.
Nextcloud has got a “relative” clear statement about in the docs:
if you have a fresh install, consider reinstalling with your preferred directory location.
Unofficially moving the data directory can be done as follows:
- Make sure no cron jobs are running
- Stop apache
- Move /data to the new location
- Change the config.php entry
- Edit the database: In oc_storages change the path on the local::/old-data-dir/ entry
- Ensure permissions are still correct
- Restart apache
For a safe moving of data directory, supported by Nextcloud, recommended actions are:
- Make sure no cron jobs are running
- Stop apache
- Move /data to the new location
- Create a symlink from the original location to the new location
- Ensure permissions are still correct
- Restart apache
I think both ways as written in the Nextcloud manual will work, but the preferred way to do (as per recommendation from Nextcloud) is the “Soft-Link” way … i think the reason for is, that for some users … it may be tricky (& dangerous) manipulating the Database.
But what i really want to know/test is - if there is a command (like occ transfer), where you can do that … when i’ve find some time, i can test this on a VBOX.
(i’m quite sure, OCC will change the storage path & the Database entries accordingly)