Easily backup, restore or replicate your instance on a fallback platform

nextcloud all in one for easy backups

Looking for an installation I could easily backup, restore or replicate on a fallback platform I found:

  • nextcloud all-in-one has backup at Your fingertips, i.e. the AIO interface at yourdomain.tld:8080
  • nextcloud all-in-one backup is transactional, i.e. it handles the entire state of your instance at some point of time.

BorgBase for redundant backups
For redundant backup I found borg backup recommended and BorgBase as a cloud provider.

In an upcoming version of AIO, remote backup to BorgBase might well be added to AIO. In the meantime am using the above mentioned solution.
On that I find worth mentioning that, in order to avoid ssh connection failures, I found use of borg mount in combination with rsync reliable:
Several time I pulled archives of up to 30GB from the cloud. I did that while replicating my nextcloud back and forth from home bare metal to hosted virtual machines while using and backing them up all time.

Installation on Ubuntu

On Ubuntu 24.04 it takes - besides borgbackup and borgmatic - fuse and python3-pyfuse to be installed to make borg mount work.

apt install borgbackup borgmatic libfuse-dev fuse pkg-config python3-pyfuse3

How to replicate Your instance from the cloud

# find Your archive
borg list
# create MOUNTPOINT directory & mount Your archive
borg mount $BORG_REPO::<ARCHIVE> <MOUNTPOINT>
# sync your backup location with your archive on BorgBase
rsync -aP <MOUNTPOINT> <YOURBACKUPLOCATION>
# remove the lock
rm <YOURBACKUPLOCATION>/borg/aio-lockfile

On first startup of Your target instance You choose not to enter Your domain but <YOURBACKUPLOCATION> and your password for that.

Et voila

2 Likes

Hi, just FYI: there is a comparable guide here: Synchronize backups with remote servers (e.g. BorgBase) · nextcloud/all-in-one · Discussion #2247 · GitHub

This is based on @gbertolottiKS work of course, whom I quote, and it’s just additional information

  • stressing easy replication using AIO
  • and recommending borg mount and rsync

I see, but make sure to create the aio lockfile as otherwise other schedules backups might get triggered:
touch "$SOURCE_DIRECTORY/aio-lockfile"

This is described here: GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

1 Like

Thank You. The aio-lockfile is always present in the archive which has been synched from a locked backup location. But I have to add that it must be removed before restoring the instance from it.

Hey, just FYI: remote backups are now possible with v10.0.0 beta. Testing and feedback is welcome! See GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

1 Like

I’ve switched to AIO v10.0.0 and have updated my containers, but how can I re-configure my backup location?

You’ll find some info about this in this thread: how to change backup directory path once submitted? · nextcloud/all-in-one · Discussion #596 · GitHub

Can I use my existing ssh-keys, and my existing remote backups - or do I have to start my backup chain from new?

This is a question for timdiels who implemented and maintains the feature now. Feel free to create a post for this at Sign in to GitHub · GitHub

Just saw, that ssh keys are not for encryption, that’s the job of the passphrase, keys are just for authentication. So my old backups remain usable.

1 Like

This seems to be a bug. Can you open a bug report here?

1 Like

My fault … : My homemade solution
took remote backups from my
backup directory.
No wonder AIO cannot find backups to restore in the repository.
What’s left is a missing condition on the restore button, that the restore list be non-empty.