Project

General

Profile

Actions

Moving Nextcloud to a New Server » History » Revision 1

Revision 1/8 | Next »
Gareth Eaton, 10/16/2023 12:46 AM


Moving Nextcloud to a New Server

1. Backup old nextcloud data folder I use filebrowser for https://filebrowser.org

curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash

The login

filebrowser -a 192.168.*.* -p 8080

Login to it using your web browser http://192.168.*.*:8080 NOTE: change the 192.168.*.* with you IP address.

Download the Nextcloud/Data folder

2. In the CLI back up your mysql database, mysql -u your_mysql_username -p your_database_name < your_backup_file.sql
in my case

mysql -u nextcloud -p nextcloud < nextcloud-sqlbkp.bak

3. install a new copy of ubuntu 20.04 on your new server, update and follow the in stall instinstrushion for a new copy of nextcloud, when you get to add user call it nextcloud-admin

put the install in to sudo -u www-data php occ maintenance:mode --on

sudo -u www-data php occ maintenance:mode --on

4. now using fileziller upload the database and data folder to the new server
5. use rsyne to mv the data to the nexcloud/data folder

sudo rsync -avP source_directory/ /var/www/html/nextcloud/data/

6. restore the data base, mysql -u your_mysql_username -p your_database_name < your_backup_file.sql

mysql -u nextcloud -p nextcloud < nextcloud-sqlbkp.bak

7. now you should be able to accsess

Updated by Gareth Eaton about 1 year ago · 1 revisions