How to back up and restore Nextcloud AIO remotely using BorgBackup

We have recently introduced remote Borg backups for Nextcloud All-in-One instances. Before, only local backups on drives mounted directly on the server were possible. With the remote backup feature, you can specify a remote location as the target location for your backup, enhancing the reliability and security of your backups. During the system restore process, this target location can be specified to spin up a new Nextcloud AIO instance and restore the state on a new server in minutes.
Like many features in Nextcloud, the remote Borg backup feature is a community contribution. Big thanks to hannahdiels
for making it possible!
In this step-by-step guide, we explore how to create a remote backup for your Nextcloud and restore your instance from one. Follow along to make sure your backup and restore go smoothly!
Want to know how to use Nextcloud as a backup tool for your data? Read our article on everyday backups with Nextcloud.
What are the benefits of a remote backup?
Remote backup is a convenient way to protect yourself against local incidents like hardware failures, ransomware attacks, and natural disasters. Remote backups make sure your data survives even if your server doesn’t.
That is also a compliance measure when a regulation requires you to have offsite and long-term archiving. And finally, it is your key component to a sound disaster recovery plan, when you need to restore your Nextcloud quickly and effectively.
How to back up Nextcloud AIO remotely using Borg
Once you have installed your All-in-One Nextcloud solution on a Windows or a Linux server, you will get access to the AIO interface. Scroll to the “Backup and restore” section to find your backup settings.
1. Submit the backup location
Enter the remote backup location into the Remote borg repo
input field and click on « Submit backup location » to proceed. It should be in the form ssh://user@host:port/path/to/repo
.
2. Start a new backup container
A new interface will open. Here, Click “Create backup” to start a new backup container.
3. Authorize the SSH key
Initially, you won’t be able to proceed without an SSH key. But don’t worry, you will get the key after your first attempt. Authorize the key on your Borg remote, then scroll down to « Backup creation » and click “Create backup” again.
4. Finish the backup process
Once your back up has been created successfully, you should see a confirmation with the time and date.
5. How to to restore a backup
Scroll down to the « Backup and restore » section of the AIO interface and click « Click here to reveal all backup options ». In the the « Backup restore » subsection here, select the version that you want to restore and click the « Restore selected backup » button.
How to restore Nextcloud from a remote backup with a new AIO instance
If you spin up a new AIO instance and easily restore the state from a remote backup repository. Follow the steps below to learn how.
1. Submit the backup location and password
Scroll down toto the “Restore AIO instance from backup” section in the AIO interface. Enter the remote Borg location and the Borg encryption password, and click “Submit location and encryption password”.
The next step is to test this path and encryption password.
2. Authorize the SSH key
The initial test will fail, but this is fixed easily — you just need to authorize a new SSH key. Obtain the key from the information on your screen and authorize it, then click on “Submit location and encryption password” again.
3. Repeat the test
Run the test again by clicking on the Test path and encryption password button. If your test has been successful, you will be notified and prompted to restore the backup from the chosen location. Click “Restore selected backup” to start the restore process.
4. Finish the process and update your containers
Once done, you will land in the panel with an overview of your containers. Now click “Start and update containers”. Done!
Explore the new features of Nextcloud Hub 10
Welcome Nextcloud Hub 10 – our most integrated, modular platform for secure collaboration. Our latest release comes with reinforced performance in every app, deeper integration across the platform, and dozens of new features that will make your day easier:
- End-to-End encryption in calls and web
- Performance improvements across all our products
- Thousands of tweaks for improved UX and stability
- Nextcloud Assistant 3.0 – your new personal assistant
- File conversion directly in Nextcloud Files
- Smarter team sharing with Team folders
- Schedule meetings directly in Nextcloud Talk
- Mail you love again: translations, summaries, and mentions
- … and much more!
Get Nextcloud Hub 10 now!
Download the latest version of Nextcloud Hub here. Or if you are new – start your instant trial right away!