Because let’s be honest, why in the hell does a backup server needs to run 24x7 in many cases??
Well less rambling and more hammering! let’s me walk you through on how I did just that!
First thing first, you gonna need to figure out what you gonna backup. For me it’s the Pterodactyl’s backing up feature that we want to “clone” backups to remotely as reasonably soon as possible. Just in case the main server “blows up” so to speak.
So with the help of my two providers (LunaNode and my main provider Hostilic). I figured out the following…
Firstly a PHP script for “shelving” operations to “put the Backup VM away.”
Second another PHP script for Unshelving operations for “get the Backup VM back online and sat!”
Now to put that all together into a working Shell Script (.sh) so we can crontab (schedule) the whole ordeal…
Now that we got all of that taken cared of, this shell script that I found off of https://stackoverflow.com/a/28341234 was modified somewhat to the above. To add the needed shelving and unshelving operations.
In this way if the files are older, it will attempt to put the Backup VM “away” thus offling it. However if they are newer hence needing to be backed up they will prompt the LunaNode’s API to bring it back online for backing up. Then simply rinse and repeat!
Thereby significantly reducing my online wastefulness when it comes to backing up. As well as my computal bills. :)
Surely it’s not a “clean and cut dry” solution but hey it’s a start right? :)
I can see some of your points but sadly am very confused on your phrasing of “it’s costs more to shutdown a server…” because unless you are at a REALLY dated provider or colocation provider… It should be be possible to shutdown a server and bring it back online all remotely. As well as automatic at times. Requiring possibly no human interactions like these scripts demotrated.
As you said though IF you actually do need hourly backups through or whatever then you MIGHT need a server at all times but…
I would say if you can do it properly per scale you can make it work for even the largest of companies. As I said above even if servers are to be online all of the time, I am sure you can to an extense rev them down and bring them back online as needed.
Not only do I think it’s good for backup servers but I think networked servers like CDNs, Hypervisors, etc can do this with fair ease if there are limited number of servers to handle the absolute base loads. Then the further servers down the line can be for variable loads in every availability zone.
Indeed if there were an option to do such operations to freeze/pause the VM or server that would be ideal but it’s not common enough at providers to be doing this for energy.
BUT… you are still “holding onto” resources that could go to someone else (e.g. vCores, RAM, actual unit, etc) so I would only recommend this IF your needs demands such an availability option NEXT to keeping it online at all hours of the days.
Aww you are very welcome! Hopefully this and other efforts can be more widespread indeed. :)
I had formatting issues when I tried quoting and spoiling them so I had to paste them somewhere.