This script can be ran to backup pterodactyl server backups to cloud storage
- Node JS (Latest LTS is good, tested in 14.x)
- Pterodactyl (Wings)
I use nano, alternatives are avalible. Paste the script below into the file when nano or your editor of choice opens and save (after adding in your information in missing areas)
npm i -g linode-object-upload
nano /etc/pterodactyl/mkbackup.sh
The below cron job will run every six hours, you are able to edit. Try searching for cron calculators if you don't know the syntax.
To open crontab do sudo crontab-e
then add the following line
10 */6 * * * /bin/bash /etc/pterodactyl/mkbackup.sh
- This script will say an error
NetworkingError [ERR_STREAM_WRITE_AFTER_END]: write after end
but it does work, it's something to do with the request lib it uses