Snaps

Visit site

A simple command line tool for creating scheduled snapshots

About

Build project

cd <path to Snaps.sln>
dotnet build -c Release

Or

Download binaries

Create alias

nano ~/.bashrc
alias snaps="dotnet /xxx/xxx/Snaps.dll>"

Usage

Set API token

snaps settings -t <Your DigitanlOcean API token>

Set max parallel tasks

snaps settings -mc <numebr> #Max degree of concurrency for create snapshot (default 5)

Create snapshot for droplets

snaps list -d # Get your list droplets
snaps snapshot <droplet ids> -d # Create a snapshot for droplets

For example:

snaps list -d
snaps snapshot 1 2 3 4 -d

Create snapshot for volumes

snaps list -v # Get your list volumes
snaps snapshot <volume ids> -v # Create a snapshot for volumes

For example:

snaps list -v
snaps snapshot 1 2 3 4 -v

Create cron job

crontab -e
* * * * * snaps snapshot <droplet ids> -d # Create a snapshot for droplets
* * * * * snaps snapshot <volume ids> -v # Create a snapshot for volumes

Create cron job from a file

snaps list -d -o /home/dproplets.csv # Export droplet ids to a file
snaps list -v -o /home/volumes.csv # Export volume ids to a file
crontab -e
* * * * * snaps snapshot -d -f /home/dproplets.csv # Import droplet ids from a file
* * * * * snaps snapshot -v -f /home/dproplets.csv # Import volume ids from a file
Was this helpful?
 
Leave a comment


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Publish your Tool on Community

Have you created an Integration, API Wrapper, Service, or other Tool that helps developers build on DigitalOcean? Help users find it by listing it in Community Tools.

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel