Migrating Nextcloud data to ONLYOFFICE Workspace

Introduction

This article describes how to transfer data from the Nextcloud server to your ONLYOFFICE portal.

Starting from ONLYOFFICE Workspace 12.0.0, you can export users, their files, and sharing settings to your portal.

Export data from Nextcloud

Enabling the maintenance mode

First, you need to enable the maintenance mode on your Nextcloud server. The maintenance mode stops the server and allows you to export data from the Nextcloud installation folder and MySQL database. To activate the maintenance mode:

  1. Go to the folder with the Nextcloud installation.
    cd /var/www/html/nextcloud
  2. Run the occ file to enable the maintenance mode.
    sudo -u www-data php occ maintenance:mode --on
    Depending on the operating system, the location of the Nextcloud installation folder might differ.
Exporting the data folder

To successfully migrate your data to ONLYOFFICE Workspace, you need to include the users' folders in the backup archive. They are located in the data folder within the Nextcloud directory.

To export the data folder, run the following command:

sudo rsync -Aax /var/www/html/nextcloud/data [preferred location]/data/

Where [preferred location] is the destination of the exported folder.

Exporting the database

You also need to export the MySQL backup file. There are two possible ways of dumping the database.

If the database is deployed on the same server, run:

sudo mysqldump --lock-tables -u root -p nextcloud_db > [preferred location]/nextcloud-dirbkp_`date +"%Y%m%d"`/

Where [preferred location] is the destination of the exported folder.

If the database is deployed on a different server, run the following command:

mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
Disabling the maintenance mode

After all the necessary folders and files have been exported, you can disable the maintenance mode and start the Nextcloud server.

To do that, go to the Nextcloud installation folder and run:

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

Prepare the data for import

To import the data, you need to compress specific files and folders into a zip archive. The archive.zip file contains the data folder, which stores the folders of the Nextcloud users, and the database backup file. The structure of the archive.zip file looks as follows:

-archive:
    - data:
        - user1
        - user2
        - user3
    - MySQL backup file
We recommend storing only users' folders within the data directory. Storing the remaining files and folders within this directory might cause errors when importing the data.

Import the data to ONLYOFFICE Workspace

  1. Sign in to your ONLYOFFICE Workspace.
  2. Go to the Control Panel.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  3. Select the Data import option in the PORTAL SETTINGS section.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  4. Click INITIALIZE IMPORT in the Nextcloud section.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  5. Click the Plus button next to the selection box and select the archive.zip file.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace

    Wait for the archive to load. When the loading is complete, click UPLOAD TO SERVER.

    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  6. Select the users to be imported into ONLYOFFICE and click NEXT STEP. In this step, only users with emails will be migrated.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  7. In this step, you can select users without specified emails, complete their email addresses, and migrate them to your portal. To do that, enter the user's email address and click the Tick button next to the email text box. Select multiple users from the list by selecting the users' checkboxes. Proceed to the next step by clicking NEXT STEP.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace

    There is also an option to download the unimported users by clicking DOWNLOAD UNIMPORTED USERS.

  8. Select the modules for import. The data will appear in the corresponding modules of ONLYOFFICE. Click START DATA IMPORT to proceed to the final step.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
  9. After the data is migrated, click FINISH to complete the data import.
    Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace

Optionally, you can send a welcome letter to the imported users. This letter informs your Nextcloud users about the migration to ONLYOFFICE Workspace. It contains a brief description of the main features and a login link. To send the letter, select the Send Welcome Letter option before clicking FINISH.

Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace

After the migration is complete, the new users can be found in the People module.

Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace

Their files with the imported sharing settings can be accessed through the Documents module.

Migrating Nextcloud data to ONLYOFFICE Workspace Migrating Nextcloud data to ONLYOFFICE Workspace
Article with the tag:
Browse all tags