as this is such an helpfull and kind community I thought, I maybe could ask for some help here on a task I was assigned. I found a nice script that mostly does what we want. But I have to automate the snapshoting on a proxmox server further thus I 'd like to adapt the following script to our needs.
First thing is we need to do the backups on an encrypted pool, so adding a line with:
zfs load-key $BACKUPPOOL is easy but as we want to put the script in a cronjob I’d like to know how I can put the password in a variable or hardcode it into the script so there is no prompt asking for it.
Secondly - and that seems a bit more complicated, I’d like to know howto expand the script so it would be possible to also ssh to two remote proxmox servers to do the same as the script does locally, meaning taking snapshots of defined vm-disks and sending them through ssh back to the local server while keeping a number of $KEEPOLD of the snapshots.
Finally - in our setup we have no datasets for the vm-disks but rather created them directly on the pool.
But the script expects poolname\datasetname\vm-disk-xyz-disk-0 whereas we for now have poolname\vm-disk-xyz-disk-0 but if its easier I can create a dataset named disks and move the vm-disks there and modify the ProxMox vmconfigs instead of modifying the logic of the script if necessary.
I would be very glad/thankfull, if you guys could give me a hand on that one!