I use a second rockstor.
If you use Rockstor’s baked-in ability to clone to a second Rockstor box, is there any way to configure that to work across the web
Yes, but it’s unencrypted, there’s no rotation, little documentation, it’s flaky (in my experience) when copying large subvolumes, is slow (doesn’t use full bandwidth), and can’t do an initial bulk replication locally (then ship the disk\s to destination and continue replicating).
Instead, I use this: Merlin’s BTRFS Subvolume Backup shell script. The only modification is I removed the shlock section since Rockstor\Centos doesn’t have shlock in any package manager. Also removed the last line “rm $lock” since this caused an error. Has been working well for many months.
On source NAS, save to /root/merlins_btrfs_ssh.sh. Initially, the backup script needs to be run using the --init switch:
cd /mnt2/<pool_containing_share_you_want_to_backup>
~/merlins_btrfs_ssh.sh --init --keep <quantity_of_backups_to_keep> --dest <FQDN_of_backup_NAS> <share_you_want_to_backup> /mnt2/<pool_on_destination_NAS>
Then to schedule, add a line to crontab on source rockstor:
vi /etc/crontab
0 3 * * 0 root (cd /mnt2/<pool_containing_share_you_want_to_backup> && exec ~/merlins_btrfs_ssh.sh --keep <quantitity_of_backups_to_keep> --dest <FQDN_of_backup_NAS> <share_you_want_to_backup> /mnt2/<pool_on_destination_NAS>)
Above will run every Sunday at 3am, see cron documentation re adjusting the schedule to suit.
Then to allow the cron job to work unattended, enable passwordless ssh login from source to destination NAS. There are plenty of instructions explaining how to setup ssh key login.
You’ll need to forward TCP port 22 from destination router to destination rockstor assuming it doesn’t have it’s own external IP, and set up a dynamic DNS service, eg NoIP if necessary, so name resolution continues to work if the destination NAS is on a dynamic external IP address.
This approach is:
- encrypted in transit (via ssh)
- has customisable rotation
- incremental, only deltas copied
- uses btrfs and rockstor: no add-ins, cloud subscription fees or extra licences
- According to my testing, resumes from where left off if interrupted (eg due to network outage)
- Can do initial bulk copy locally on fast network, ship disk\s to destination, import BTRFS pools & shares and continue replicating