Trying to save some power with not having the backup server running 24/7
Ok, that's understandable. For me it would be highly unpractical that I would have to turn on the PBS in case I want to restore a backup.
So if energy costs are of concern I would do something like this:
- Setup a VM on your ProxmoxVE with ProxmoxBackupServer, create as much backups as you like. Create a user and apikey for the physical PBS. It's permissions should be set that the physical and offsite PBS can pull backups but NOT remove or otherwise alter them so in case of a ransomware or hacker attack the damage is limited as much as possible: https://pbs.proxmox.com/docs/storage.html#ransomware-protection-recovery
- Create a sync job on the physical PBS, which pulls the backups from the PBS VM: https://pbs.proxmox.com/docs/managing-remotes.html
Setup permissions that PVE, PBS VM and offsite PBS can restore/pull Backups from the physical PBS but not alter or remove them
- Create a cronjob/systemd event on PVE which wakes up the physical PBS via WakeOverLan some minutes before the syncjob starts (5-15 minutes should be enough depending on the startup time). Create a cronjob/systemd event on the physical PBS which turn it off after finishing the sync- and any other jobs (if you schedule them right and your disks are not too slow one to two hours should be enough)
- Setup a offsite pbs which pull backups from the PBS VM. Setup permissions that PVE and the PBS VM/physical PBS can pull or restore backups but not overwrite or remove them.
On the other hand: If your energy costs are really high due to your homelab it might actually be cheaper to rent a dedicated server right from the start. I rembember some guy in r/homelab on reddit sold his homelab hardware and switched to a hetzner dedicated server for exactly that reason.
Can you share how this setup works exactly? Do you run that PBS yourself on a VPS?
Exactly! Since tuxis free tier is limited to 150 GB ( my PBS datastore was right at 200 GB from the start thanks to some windows vm created from the OEM install on the MINI-PCs I built my cluster on) and they don't sell to private customers outside the Netherlands I needed another solution. I noticed that netcups vservers are quite affordable (I pay around 9 Euro für a vserver with 250 GB storage plus around 250 GB additional object storage). They don't allow to install your own Linux distribution though, you must pick one of their templates. One of them was Debian so I used that template and afterwards installed PBS manually like written in the manual:
https://pbs.proxmox.com/docs/installation.html#install-proxmox-backup-server-on-debian
Afterwards I configured everything to my needs. Most important was to setup a strict firewall (I used ufw as iptables frontend) and a wireguard VPN, so my servers (including the vservers) can only communicate via VPN with eachother. The firewall is configured that only ssh connections are allowed without VPN (of course I can also use ssh inside the VPN) and fail2ban takes care of bots/script kiddes trying to guess my password for ssh. I also disabled password authentification for ssh in favour of publickey authentification. The PBS on the vserver can pull my backups from my local PBS but not remove anything on it. And vice versa my local PBS and ProxmoxVE can pull or restore backups from the offsite server but not remove anything.
My schedule for keeping the backups is like this: On my local PBS I like to have more backups, so I can restore a VM or container if I mess something up. The schedule is like this at the moment: 6-12 Backups per VM/container per day, 30 daily backups and twelve monthly (so I have one year of history, at the moment I'm in my third month after first install.). For the sync I created a custom nameset "remote", a local syncjob sync every backup snapshots to this namespace. This namespace has a prune job, which take care, that it contains only daily snapshots. These daily snapshots are then pulled by my offsite pbs. On the offsite PBS the prune schedule is 30 daily backups, twelve monthly. The idea is, that in case of an emergency I can still restore from an earlier date, but I don't need to sync every hourly backup for it.
As additional emergency backup I do a weekly regular vzdump (Proxmox native backup function) to an external drive and my hetzner storagebox. These backups are not so space-efficent like PBS thus they are limited and for emergency use only.
I hope I havn't lost you during my ramblings?