Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Snapshot automation for droplets and volumes in DigitalOcean Cloud platform
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[category:BLS INTERNATIONAL]] [[category:Cloud Platforms]] == Digtalocean Automate Snapshot for Droplet and Volumes == Reference '''https://pypi.org/project/goutte/''' Issue - For Python 3.7 on Centos 6 Reference - https://benad.me/blog/2018/07/17/python-3.7-on-centos-6/ '''Genrate Api KEY for digital Ocean''' via https://www.easydeploy.cloud/blog/automate-droplet-snapshot-digitalocean/?unapproved=39&moderation-hash=6864fe13b1a4810007aa7067bbdca7db#comment-39 only first 2 Step to be followed '''Finally on Live Server''' For example , at '''mail.blsinternational.net ''' goutte /usr/local/etc/goutte.toml 36c095a48c01428e14b1a38c3ddce5cb57d65df42cb1d727e59a22735b1a6236 --only snapshot And file '''/usr/local/etc/goutte.toml''' retention = 2 # Number of backups to keep per droplet/volume [droplets] names = [ # Array of droplets you want to snapshot 'mail.blsinternational.net', ] [volumes] names = [ # Array of volumes you want to snapshot 'bls-zimbra-store-01', ] And '''Crontab Entry''' is 0 17 * * * goutte /usr/local/etc/goutte.toml 36c095a48c01428e14b1a38c3ddce5cb57d65df42cb1d727e59a22735b1a6236 --only snapshot > /dev/null '''Deletion of Snapshots automatically keeping last 2 old Snapshots''' Please install doctl via https://github.com/digitalocean/doctl Create the following script [root@mail ~]# cat /root/scripts/delete-old-snapshot.sh #!/bin/bash doctl compute snapshot list | grep goutte | head -n2 | awk '{ print $1 }' | \ while read i do echo "$i" doctl compute snapshot delete -f $i done As all the snapshot of BLS international starts with goutte , we have used the logic of grepping this key word In Crontab keep the time as 1 hour after the creation script has executed 0 18 * * * /root/scripts/delete-old-snapshot.sh >/dev/null 2>&1 Keep checking if it working fine periodically . Snapshots are costly so you should not have snapshots for which customer is not paying .
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)