Nextcloud: Difference between revisions
No edit summary |
|||
Line 4: | Line 4: | ||
===Moving data directory=== | ===Moving data directory=== | ||
See [https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170] | See [https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170] | ||
Nextcloud doesn't include a clean built-in way to migrate data. | |||
The ''proper'' way to do it is to fix all the paths in the Nextcloud database. However, this is slightly complicated and prone to errors. | |||
The '''easy''' way is to create a symlink: | |||
<pre> | |||
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --on | |||
mkdir -p /new/path/to/data | |||
rsync -a /path/to/data/. /new/path/to/data | |||
mv /path/to/data /path/to/dataBackup | |||
ln -s /new/path/to/data /path/to/data | |||
chown -h www-data:www-data /path/to/data # To set symlink ownership | |||
chown -R www-data:www-data /new/path/to/data # To set actual data dir ownership | |||
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --off | |||
</pre> |
Revision as of 23:28, 19 July 2020
Nextcloud is a self hosted cloud solution. It is a fork of ownCloud by the original founder.
Administration
Moving data directory
See https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170
Nextcloud doesn't include a clean built-in way to migrate data.
The proper way to do it is to fix all the paths in the Nextcloud database. However, this is slightly complicated and prone to errors.
The easy way is to create a symlink:
sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --on mkdir -p /new/path/to/data rsync -a /path/to/data/. /new/path/to/data mv /path/to/data /path/to/dataBackup ln -s /new/path/to/data /path/to/data chown -h www-data:www-data /path/to/data # To set symlink ownership chown -R www-data:www-data /new/path/to/data # To set actual data dir ownership sudo -u www-data php /path/to/nextcloud/occ maintenance:mode --off