How to get BTRFS backups working in NextcloudPi?

Running NC15

This shows the nc-snapshot options. I have NCpi running on Debian (not in a container) on a hdd formatted as ext4. I have a usb drive formatted as BTRFS that I have inserted and wish to use as the destination of my snapshots.

But looking at this screenshot, does this mean that I have to have my data dir on the nextcloud server, in a BTRFS file system?

Yes, that is correct.
So, for example:
If the BTRFS formatted drive is labeled “MYBTRFS1” and auto-mounted as

/media/MYBTRFS1

You can use the command

sudo btrfs subvolume create /media/MYBTRFS1/ncdata

and copy/move nc’s /data directory and edit config.php manually,
or use nc-datadir to do it for you.

You will then be able to use all of ncp’s btrfs snapshot tools

1 Like

Don’t really want to do that… Any other snapshot backup option I can use? How about rsync that’s built into ncp?

yes there are

nc-backup(-auto)
and
nc-rsync(-auto)

Nowhere near as efficient as btrfs tho.

Back to the BTRFS snapshots, I like to have my data on the hdd, and back it up to the flash drive (since I find it more likely that an accident would nuke the hdd, like using dd or something). Can I store my data on my hdd and back it up to a BTRFS formatted USB flash drive? Since the data location has to be BTRFS as well, could I just create a partition on my hdd and move my nc data dir to that new BTRFS partition?

Yes, that should work.

1 Like