Hi,
Right now I got a single PBS-VM1 on Host2 that got its datastore from Host2 via NFS. And this PBS-VM1 and NFS share is available all the time.
Problem is that I can't backup Host2 or guests on it, because if Host2 fails there would be no running PBS to restore them from.
I also got Host1 that is running PVE 24/7 and Host3 that is only power on for some hours per week to receive the ZFS replication of Host2.
So my idea was to setup a second PBS-VM2 on Host1 that syncs/pulls once per week the backups of PBS-VM1 on Host2 and stores them on a datastore on Host3 via NFS.
So in case Host2 fails I can boot up Host3 and restore my host backup and all of Host2s guest from PVE-VM2 on Host1.
In theory this should work fine in case Host1 and Host3 would be available all the time.
But how will PBS handle a offline datastore?
Would it be no problem if the NFS share with the datastore is offline, as long as it is online again when the sync, prune, GC and verify jobs are triggered?
Or would it be recommenden to send PBS into the new maintaince mode before shutting down Host3 with its NFS share and keep the PBS-VM2 running?
Or should I completely shutdown PBS-VM2 before shutting down Host3?
Is there also a way to disable a datastore like it is possible in PVE to disable a NFS storage to prevent annoying logs that the NFS share isn't reachable?
I guess shutting down PBS-VM2 before the NFS share goes offline should but would be good to know if maintaince mode or normal operation would work too.
Host3 will always boot up at the same time but is shutdown dynamically at different times by a script that monitors the state of the ZFS replication, scrub and resilvering as soon as all is finished. My idea was to edit this script and use the PBS API to also only allow to shutdown Host3 after all GC, verify, prune and sync jobs are finished. So I guess starting the PBS-VM2 using PVE API or enableing/disableing maintaince mode or shutting down the VM by using the PBS API shouldn't be a problem.
Edit:
I could think of something like that:
Sat 23:45: send command (IPMI) to boot up Host3. NFS should be available in within 5 minutes.
Sun 00:00: ZFS replication starts to backup Pools from Host2 to Host3. Usually finished within 1 hour. All 4 weeks a scrub will additionally run that needs around 20 hours to finish.
Sun 00:45: boot up PBS-VM2 using PVE API
Sun 01:00: PBS sync job starts pulling backups (only namespaces for weekly and manual backups as daily backups woulnd't make sense when only syncing once a week) from PBS-VM1 to PBS-VM2
Sun 02:00: prune job starts on PVE-VM2
Sun 02:10: GC job starts on PVE-VM2
Sun 02:20: Verify job starts on PVE-VM2
Sun 02:30: start checking if ZFS replication/scrub/resilvering is finished on Host3 (TrueNAS API) and if sync/GC/prune/verify jobs on PBS-VM2 are finished (PBS-API). As soon as all is finished shutdown PBS-VM2 (PVE API), wait until PBS-VM2 is stopped, then shutdown Host3 (TrueNAS API).
Would that work is there a better way to do it?
Right now I got a single PBS-VM1 on Host2 that got its datastore from Host2 via NFS. And this PBS-VM1 and NFS share is available all the time.
Problem is that I can't backup Host2 or guests on it, because if Host2 fails there would be no running PBS to restore them from.
I also got Host1 that is running PVE 24/7 and Host3 that is only power on for some hours per week to receive the ZFS replication of Host2.
So my idea was to setup a second PBS-VM2 on Host1 that syncs/pulls once per week the backups of PBS-VM1 on Host2 and stores them on a datastore on Host3 via NFS.
So in case Host2 fails I can boot up Host3 and restore my host backup and all of Host2s guest from PVE-VM2 on Host1.
In theory this should work fine in case Host1 and Host3 would be available all the time.
But how will PBS handle a offline datastore?
Would it be no problem if the NFS share with the datastore is offline, as long as it is online again when the sync, prune, GC and verify jobs are triggered?
Or would it be recommenden to send PBS into the new maintaince mode before shutting down Host3 with its NFS share and keep the PBS-VM2 running?
Or should I completely shutdown PBS-VM2 before shutting down Host3?
Is there also a way to disable a datastore like it is possible in PVE to disable a NFS storage to prevent annoying logs that the NFS share isn't reachable?
I guess shutting down PBS-VM2 before the NFS share goes offline should but would be good to know if maintaince mode or normal operation would work too.
Host3 will always boot up at the same time but is shutdown dynamically at different times by a script that monitors the state of the ZFS replication, scrub and resilvering as soon as all is finished. My idea was to edit this script and use the PBS API to also only allow to shutdown Host3 after all GC, verify, prune and sync jobs are finished. So I guess starting the PBS-VM2 using PVE API or enableing/disableing maintaince mode or shutting down the VM by using the PBS API shouldn't be a problem.
Edit:
I could think of something like that:
Sat 23:45: send command (IPMI) to boot up Host3. NFS should be available in within 5 minutes.
Sun 00:00: ZFS replication starts to backup Pools from Host2 to Host3. Usually finished within 1 hour. All 4 weeks a scrub will additionally run that needs around 20 hours to finish.
Sun 00:45: boot up PBS-VM2 using PVE API
Sun 01:00: PBS sync job starts pulling backups (only namespaces for weekly and manual backups as daily backups woulnd't make sense when only syncing once a week) from PBS-VM1 to PBS-VM2
Sun 02:00: prune job starts on PVE-VM2
Sun 02:10: GC job starts on PVE-VM2
Sun 02:20: Verify job starts on PVE-VM2
Sun 02:30: start checking if ZFS replication/scrub/resilvering is finished on Host3 (TrueNAS API) and if sync/GC/prune/verify jobs on PBS-VM2 are finished (PBS-API). As soon as all is finished shutdown PBS-VM2 (PVE API), wait until PBS-VM2 is stopped, then shutdown Host3 (TrueNAS API).
Would that work is there a better way to do it?
Last edited: