This guide will help you set up automatic backup to a second USB drive.
Important: make sure you use the drive label in nc-datadir and other configuration options. Use names such as
/media/myCloudDrive, instead of/media/USBdrive, or otherwise the system will not be able to guess which drive holds the data and which one holds the backups.
Procedure
- Complete at least steps 2 and 3 of the Guide to configure an external USB drive with NextCloudPi.
- Format second USB drive with
nc-format-USB(optional but see Note). - Configure and activate
nc-backup-autoto the second USB drive”.
Complete required steps from the Guide to configure an external USB drive with NextCloudPi
You first need to configure this guide. nc-backup-auto is going to retrieve Nextcloud directory and database and backup them.
Format second USB drive with nc-format-USB (optional but see Note)
IMPORTANT: To format the second USB drive with nc-format-USB you first need to remove the first USB drive!
Note: The disk must not be formated as NTFS/FAT as these do not support the user/permission system.
- Remove the first USB drive.
- Navigate to
nc-format-USBin the TUI or the WebUI. - Change the
LABELto a label you like. This is also the name of the directory that the USB drive will mount to (e.x. /media/”myLabel”). Do not use the same Label to both USB drives! - Click Run or Start.
Configure and activate nc-backup-auto to the second USB drive
- Navigate to
nc-backup-autoin the TUI or the WebUI. - Change
ACTIVEtoyes. - Change
DESTDIRto the mount point of the second USB drive. - Change
INCLUDEDATAtoyesif you want to backup Nextcloud data as well (optional). - Change
BACKUPDAYSto a desired number of days to take each backup. - Change
BACKUPLIMITto a desired amount of backup limit. This means that for example if you set to 3 and time comes to take an other backup, the first back up will be removed and replaced with the new one.
Final words
This is what you have to do to enable Auto Backups.