A command-line snapshot maker for your DigitalOcean droplets. Fully Automated. Multi-threaded.
by: DOSnapshot August 28, 2014 Visit Site


  • By far my favorite tool. First commit on GitHub was in July of 2014, so it's relatively new and seems to work very well.

    I love that it starts droplets back up when it's done taking the snapshot.

    This is the only tool I use to make snapshots.

  • Great tool. Thanks!

  • Hi Admin,
    Im having problems to use DoSnapshot.

    do_snapshot --digital-ocean-client-id ****** --digital-ocean-api-key "my api key"
    Start performing operations
    Droplet Listing is failed to retrieve
    Access Denied

    come up with Access Denied, why ?


  • Now it works on API V2 Too.

  • Hi Admin,
    im using dosnapshot v1 and working perfectly but cant delete the old snapshot.
    the command i used is do_snapshot -k 7 --digital-ocean-client-id xxxxx --digital-ocean xxxx

    at moment , just doing snapshot but without delete the old snapshot . Can you help me ?


    • Hello, can you post your full log? To get it just run do_snapshot with -v option.

    • You forgot to add flag '-c' into the command. Sorry I didn't notice, it was hard week.
      By default do_snapshot works without cleanup. For your own safety.
      RTFM :)

  • Hello, can you post your full log? To get it just run do_snapshot with -v option.

    • Hi ,

      i hope this is what you looking for

      dosnapshot -v --digital-ocean-client-id xxx --digital-ocean-api-key xxxxx
      Checking DigitalOcean Id's.
      Start performing operations
      Loading list of DigitalOcean droplets
      Setting DigitalOcean Id's.
      Droplet id: 4617772 name: angelbabe Preparing droplet id: 4617772 name: angelbabe to take snapshot.
      For droplet with id: 4617772 and name: angelbabe the maximum number 10 of snapshots is reached.
      Working with list of DigitalOcean droplets
      Shutting down droplet.
      Start creating snapshot for droplet id: 4617772 name: angelbabe.
      Wait until snapshot will be created.
      Snapshot name: angelbabe
      20150512 created successfully.
      Droplet id: 4617772 name: angelbabe snapshots: 39.
      All operations has been finished.

      is showing reached 10 , but didnt do anything.


  • ok, which version of do_snapshot? and which version of ruby you have, or installation type?

  • Most useful and elegant tool that I can find to do this! Bravo and many thanks.
    To properly work I am having to add option -d 30 or else the script comes out claiming that droplet not powered off!

    • Thanks! I'm glad that you find it useful!)
      For now you can use --stop-by-power option to fix it.

  • Good morning,
    I have used your tool for more than a year so far with only occasional hiccups. Thank you so much for that.
    However starting a week ago I am having problems. I am using the following command:

    dosnapshot --only $HSETIN $SRITONI_WS1 --keep 2 -c -v -p 2 --stop-by-power

    And I get the following error:

    Shutting down droplet.
    Droplet id: xxxxxxx is Failed to Power Off.

    Actually the droplets were powered off but the script is unable to synchronize with this apparently?

    Any help would be appreciated.

    Also, I would like to donate and so can you please setup a paypal?



    • Hello, Madhu,
      Thanks for your report,

      Too found this weird bug few hours ago. Planned try to fix it today. Seems that something changed in DO API.

      Also, thank you for appreciating this work
      My paypal for donations:

    • Looks like something was wrong with DO API, tried same commands on old and new droplets. With stop-by-power & without. Both finished correctly. I will look why droplet not started back.

  • Now that snapshots can be created without shutting down a droplet, what changes need to be made to DOsnapshot?

  • Hi,

    I love this tool! Great work, but im struggling getting it to work with crontab -e

    So if I run:
    do_snapshot --only DROPLETID --keep 10 --clean --trace --digital-ocean-access-token KEYHERE

    then everything works fine, however if I try running it in crontab -e:
    0 3 * * 2,3,7 do_snapshot --only DROPLETID --keep 10 --clean --trace --digital-ocean-access-token KEYHERE

    Then it executes in CRON (according to syslog) but it doesnt show any errors other than :no mta installed discarding output. So I really dont see why it doesnt work.

    I tried including the method to send output to email, but wasnt able to get that work either (Got some errors with google smtp).

    In addition I have "disabled" root and are using SSH key instead. But when editing crontab I use sudo crontab -e

    Are you able to understand what I am doing wrong?


    • Hi,
      Can you enable log with --log PATHTOFILE option?

      • I did, so lets see if I get something in the log file now.. didnt get anything when I used >> /var/log/somelogfile.log

      • So I did that now, but nothing in that logfile and in syslog it executed, but on the second line again it says:
        no mta installed discarding output.

        I tried the same command yesterday without the cron, and then it works fine.

        Any idea?

        • Also for DOSnapshot within cron you can use -q option, to discard output, because it's can be written into a file..

          It can be a bunch of reasons, as i c, the problem is not related with DOSnapshot:

          • My reason was that I needed to specify the full path,
            0 5 * * 3,7 /var/lib/gems/2.3.0/gems/dosnapshot-0.6.3/bin/dosnapshot --only DROPLETIDS--keep 10 --clean --trace --digital-ocean-access-token ACCESSTOKEN --log /var/log/cronsnaps.log

            With this everything works like a charm!! Thanks for an amazing product1

    • Hi,
      Can you enable log with --log PATHTOLOGFILE?

    • Hi,
      Can you enable log with --log PATCHTOLOGFILE option?

  • Hi,
    After creating snapshot with doSnapshot, how can I automatically transfer the snapshot to a different region then remove it from the source region?

    This makes disaster recovery much better since the snapshots are kept in a different region than the droplet.

    Would you consider adding that feature? :)

    • Hi, this DO feature, out of the box,
      So i can suggest you create/restore droplet in right region.