Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Project Page at Digital Ocean, comment or vote for this project.
Use this tool to backup DigitalOcean droplet's via snapshot method, on the fly!
Barge
to DropletKit
. Release 1.0.0
.--shutdown
, --no-shutdown
.shutdown
now disabled by default, no downtime anymore, YES
!shutdown
back use --shutdown
option.Here are some features:
From 1.0.0
:
Prior to 0.6.4
:
Install it yourself as:
$ gem install do_snapshot
System Wide Install (OSX, *nix):
$ sudo gem install do_snapshot
For OSX users (Homebrew Tap):
$ brew tap merqlove/do-snapshot && brew install do_snapshot
$ do_snapshot -V
Standalone with one-liner:
$ wget https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/do_snapshot.tgz && sudo tar -xzf do_snapshot.tgz /usr/local/lib/ && sudo ln -s /usr/local/lib/do_snapshot/bin/do_snapshot /usr/local/bin/do_snapshot
Standalone pack for Unix/Linux users: Download
$ wget https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/do_snapshot.tgz # if not done.
# Example Install into /usr/local
$ tar -xzf do_snapshot.tgz /usr/local/ && ln -s /usr/local/do_snapshot/bin/do_snapshot /usr/local/bin/do_snapshot
$ do_snapshot help
Standalone Zip pack for others: Download
Mainly it's pretty simple:
$ do_snapshot --only 123456 -k 5 -c -v
You'll need to generate an access token in Digital Ocean's control panel at https://cloud.digitalocean.com/settings/applications
$ export DIGITAL_OCEAN_ACCESS_TOKEN="SOMETOKEN"
If you want to set keys without environment, than set it via options when you run do_snapshot:
$ do_snapshot --digital-ocean-access-token YOURLONGTOKEN
Here we keeping
only 5 latest snapshots and cleanup older after new one is created. If creation of snapshots failed no one will be deleted. By default we keeping 10
droplets.
$ do_snapshot --keep 5 -c
Keep latest 3 from selected droplet:
$ do_snapshot --only 123456 --keep 3
Working with all except droplets:
$ do_snapshot --exclude 123456 123457
Keep latest 5 snapshots, send mail notification instead of creating new one:
$ do_snapshot --keep 10 --stop --mail to:yourmail@example.com
E-mail notifications disabled out of the box. For working mailer you need to set e-mail settings via run options.
--mail to:mail@somehost.com from:from@host.com --smtp address:smtp.gmail.com port:25 user_name:someuser password:somepassword
0 4 * * 7 . /.../.digitalocean_keys && /.../bin/do_snapshot -k 5 -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:2525 -q -c
$ bin/do_snapshot --only 123456 -k 3 -c -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:2525 -v
Checking DigitalOcean Id's.
Start performing operations
Setting DigitalOcean Id's.
Loading list of DigitalOcean droplets
Working with list of DigitalOcean droplets
Preparing droplet id: 123456 name: mrcr.ru to take snapshot.
Shutting down droplet.
Start creating snapshot for droplet id: 123456 name: mrcr.ru.
Wait until snapshot will be created.
Snapshot name: mrcr.ru_2014_07_18 created successfully.
Droplet id: 123456 name: mrcr.ru snapshots: 4.
For droplet with id: 123456 and name: mrcr.ru the maximum number 3 of snapshots is reached.
Cleaning up snapshots for droplet id: 123456 name: mrcr.ru.
Snapshot name: mrcr.ru_2014_07_17 delete requested.
All operations has been finished.
Sending e-mail notification.
> $ do_snapshot c
aliases: s, snap, create
Options:
-p, [--protocol=1] # Select api version.
# Default: 2
[--shutdown], [--no-shutdown] # Check if you want to stop your droplet before the snapshot.
-o, [--only=123456 123456 123456] # Select some droplets.
-e, [--exclude=123456 123456 123456] # Except some droplets.
-k, [--keep=5] # How much snapshots you want to keep?
# Default: 10
-d, [--delay=5] # Delay between snapshot operation status requests.
# Default: 10
[--timeout=250] # Timeout in sec's for events like Power Off or Create Snapshot.
# Default: 3600
-m, [--mail=to:yourmail@example.com] # Receive mail if fail or maximum is reached.
-t, [--smtp=user_name:yourmail@example.com password:password] # SMTP options.
-l, [--log=/Users/someone/.do_snapshot/main.log] # Log file path. By default logging is disabled.
-c, [--clean], [--no-clean] # Cleanup snapshots after create. If you have more images than you want to `keep`, older will be deleted.
-s, [--stop], [--no-stop] # Stop creating snapshots if maximum is reached.
[--stop-by-power], [--no-stop-by-power] # Droplet stop method, by it's power status (instead of waiting for event completed state).
-v, [--trace], [--no-trace] # Verbose mode.
-q, [--quiet], [--no-quiet] # Quiet mode. If don't need any messages in console.
[--digital-ocean-access-token=YOURLONGAPITOKEN] # DIGITAL_OCEAN_ACCESS_TOKEN. if you can't use environment.
[--digital-ocean-client-id=YOURLONGAPICLIENTID] # DIGITAL_OCEAN_CLIENT_ID. if you can't use environment.
[--digital-ocean-api-key=YOURLONGAPIKEY] # DIGITAL_OCEAN_API_KEY. if you can't use environment.
Description:
`do_snapshot` able to create and cleanup snapshots on your droplets.
You can optionally specify parameters to select or exclude some droplets.
Support this project and others by merqlove via gratipay.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)$ rake spec
Copyright (c) 2015 Alexander Merkulov
MIT License
FAQs
Unknown package
We found that do_snapshot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.