Make weekly backups separate from the Linode Backup service?
Do you have a pre-made weekly backup script, something that I can place on my Linode and create once per week or so another backup (different than the one that gets overwritten every day) using your API?
1 Reply
There's not a way to create an alternative backup using the API, however you can trigger a weekly backup from inside of your Linode using a number of different backup tools. I found this article that discusses different backup solutions, many of which are command line based, and should be good for the task, but for this post I'll focus on rsync
, as it's a popular tool. It's worth noting that the steps should also be applicable to any other CLI-based backup tool.
The simplest way to do this is by scheduling your backup tool to run as a cron
job. I've included our guide on using cron
, but here's an example crontab
entry that will run an automatic backup to your local machine at 12am every Sunday:
0 0 * * 7 root rsync -avz "${SOURCE_PATH}"
"${DESTINATION_IP_ADDRESS}":"${DESTINATION_PATH}"
Where "${SOURCE_PATH}"
is the folder you are copying from the Linode, and "${DESTINATION_PATH}"
is the folder you are copying the data to. For this to work, you will need to have rsync
running on your other machine, as well as your SSH port open. You could also run the job on your local machine if it uses cron
. I've also included our guide on using rsync for your reference.