Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to periodically backup to a second USB drive with NextCloudPi
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.
- 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".
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.
DESTDIRto the mount point of the second USB drive.
yesif you want to backup Nextcloud data as well (optional).
BACKUPDAYSto a desired number of days to take each backup.
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.
This is what you have to do to enable Auto Backups.