How to restore a backup nextcloud service
井民全, Jing, mqjing@gmail.com
The google doc version: (view)
Not enough space to store the data? This document shows you how to restore the old smaller one device to a larger device. Do any thing, please backup your nextcloud system at first.
|
Here, we're talking about restore.
In oder to access your backup file, you should mount the USB device where the backup file located and make sure it can be access from the nextcloud instance. After that, you use occ-restore command. So the basic idea can be divided into 3 steps.
|
Let's see the quick procedure.
Enjoy!
by Jing.
1. Quick
|
2. Detail
Step 1: Locate the backup file
Supoose your backup file location at following.
Device:
/dev/sda1
File:
/media/pi/MYDISK/ncdata/backups/ncp-backups/nextcloud-bkp_20220922_1663858689.tar.gz
Step 2: Mount the device
If our nextcloud service instance was running by following commands.
The easiest way to access to the file that will be used to restore the system is mount the device to the sub-directory of the nc_data_old/_data. (Note, you cannot use symbolic link in docker.)
In host, |
e.g.
Step 3: Verification & Get the file location
e.g.
The full file path is the location where you can used to restore for occ-restore instruction.
File: /data/backup/ncdata/backups/ncp-backups/nextcloud-bkp_20220922_1663858689.tar.gz
Step 4: Restore the system
Access the nextcloudPi control panel.
e.g.
Aceess the page https://192.168.1.108:4443 and choose [BACKUPS] -> [nc-restore].
Fill the Backup File: /data/backup/ncdata/backups/ncp-backups/nextcloud-bkp_20220922_1663858689.tar.gz
And then [Apply]
Wait for minutes or hours... (depends on your data size).
If there is no issue, you will see the following information.
Note: If you forget the admin user ncp's password, you can follow the instructions to reset it. (check detail)