summaryrefslogtreecommitdiffstats
path: root/nextcloud-MIGRATION.fedora
diff options
context:
space:
mode:
authorJames Hogarth <james.hogarth@gmail.com>2017-02-24 16:30:43 +0000
committerJames Hogarth <james.hogarth@gmail.com>2017-02-24 16:30:43 +0000
commit8d3b8566de3445a209b73d2b25e24b8e4dfb7513 (patch)
treeb422075ee402c52e461b0927b933db044e887210 /nextcloud-MIGRATION.fedora
parent260614d225ad68cf4bb1bc31c2480b2ccd169d56 (diff)
change the owncloud stuff to nextcloud in the readme, initial migration steps WIP
Diffstat (limited to 'nextcloud-MIGRATION.fedora')
-rw-r--r--nextcloud-MIGRATION.fedora47
1 files changed, 47 insertions, 0 deletions
diff --git a/nextcloud-MIGRATION.fedora b/nextcloud-MIGRATION.fedora
new file mode 100644
index 0000000..e3c1e11
--- /dev/null
+++ b/nextcloud-MIGRATION.fedora
@@ -0,0 +1,47 @@
+Migration from owncloud
+=======================
+
+### Prevent people using owncloud
+sudo -u apache php /usr/share/owncloud/occ maintenance:mode --on
+
+
+### If enough disk space for temporary double data usage
+## Copy data over from one location to the other
+rsync -aPh /var/lib/owncloud/ /var/lib/nextcloud/
+
+## If wanting to rename the database
+mysql -e 'create database nextclouddb;'
+mysql -e "grant all on nextclouddb.* to 'nextcloud_user'@'localhost' identified by 'nextcloud_pass';"
+mysqldump -v ownclouddb | mysql -D nextclouddb
+
+
+### If not enough space for temporary double data
+## Copy data over from one location to the other
+mv /var/lib/owncloud/* /var/lib/nextcloud/
+
+## If wanting to rename the database
+mysql -e 'create database nextclouddb'
+mysql -e "grant all on nextclouddb.* to 'nextcloud_user'@'localhost' identified by 'nextcloud_pass';"
+mysql ownclouddb -sNe 'show tables' | while read table; do mysql -sNe "rename table ownclouddb.$table to nextclouddb.$table;"; done
+
+
+### Bring over the old configuration and update paths
+cp /etc/owncloud/config.php /etc/nextcloud/config.php
+sed -i '/owncloud/nextcloud/g' /etc/nextcloud/config.php
+
+
+### Enable the nextcloud interface on httpd
+ln -s /etc/httpd/conf.d/nextcloud-access.conf.avail /etc/httpd/conf.d/z-nextcloud-access.conf
+
+### Carry out any migration required
+sudo -u apache php /usr/share/nextcloud/occ upgrade
+
+
+### Enable allow people to use nextcloud
+sudo -u apache php /usr/share/nextcloud/occ maintenance:mode --off
+
+
+### Clean up the owncloud stuff after testing
+dnf remove -y owncloud\*
+rm -rf /var/lib/owncloud /etc/owncloud
+mysql -e 'drop database ownclouddb;'