Usage of nc-snapshot vs. nc-backup

ncp
nc13

#1

Hey all,

I am following the steps for backing up my Cloud data provided here:

Still there are 2 open questions in my mind:

1.) What’s the main difference between using nc-backup including my data, and nc-snapshot? Can I use nc-backup excluding data and then doing nc-snapshot, having all my relevant data together and ready to easily restore?
2.) If so - why does nc-snapshot by default (without any UI option to change that) create the snapshot on the same drive the datadir is on? Is it safe to just move the ncp-snapshots directory to my backup drive? And can I, without interfering with anything, alter etc/nextcloudpi-config.d/nc-snapshot.sh to create the snapshot directly on my backup drive?

Probably this is also related to Auto Backup inclufing nextcloud PI image

Best regards
Dennis


#2

nc-snapshot uses no additional space, while backups with data store a whole copy of your data, which could be many gigabytes. You can have hundreds of snapshots of a 20GB datadir in a 100 GB harddrive, but only five data backups.

Yes, I recommend doing that

Due to the nature of BTRFS snapshots, the snapshots need to be created in the same drive. There is no option to change the path for simplicity.

If you want a second copy of your snapshots in another hard drive, or in another machine, you can use nc-snapshot-sync.

Cheers


#3

Thank you so much for making these points very clear! I’ll make up a backup strategy using your recommendations. Cheers
Dennis


#4

This tid bit was what I was looking for. It answered one major question for me. I have been trying to set up this backup strategy you have written about, before entering any data at all.
Now When I try to set up nc-snapshot-sync I get an error:

stat: cannot read file system information for ‘/media/hc2disk2/ncp-snapshots’: No such file or directory
/media/hc2disk2/ncp-snapshots is not in a BTRFS filesystem

Running btrfs filesystem show hc2disk shows up just like my data location. If I run ls On my data location ncp-snapshots directory shows up. What am I doing wrong?

Update: I found that leaving off the /ncp-snapshots in the destination path allows the sync to take place, and snapshots are showing up, but they are not in their own folder like in the data location. Is that the way it should be?