2017 © Pedro Peláez
 

project ovh-cloud-snapshot

OVH Cloud Automated Snapshot (via OVH API)

image

jbelien/ovh-cloud-snapshot

OVH Cloud Automated Snapshot (via OVH API)

  • Monday, July 30, 2018
  • by jbelien
  • Repository
  • 2 Watchers
  • 7 Stars
  • 71 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 12 Versions
  • 27 % Grown

The README.md

Latest Stable Version Total Downloads Monthly Downloads, (*1)

OVH Cloud Automated Snapshot

Requirements

Installation

composer create-project jbelien/ovh-cloud-snapshot

Configuration

First step

Create credentials by clicking here !, (*2)

  • POST: /cloud/project/*/instance/*/snapshot
  • POST: /cloud/project/*/volume/*/snapshot
  • GET: /cloud/project/*/snapshot
  • GET: /cloud/project/*/volume/snapshot
  • DELETE: /cloud/project/*/snapshot/*
  • DELETE: /cloud/project/*/volume/snapshot/*

Second step

Create snapshot.yml in root directory with your credentials and the list of your instances/volumes :, (*3)

---
applicationKey: <ovh_application_key>
applicationSecret: <ovh_application_secret>
consumerKey: <ovh_consumer_key>

duration: <date-interval>

projects:
  - id: "<project-1-id>"
    instances:
      - &myinstance
          id: "<instance-id>"
          name: "My Instance"
    volumes:
      - &myvolume
        id: "<volume-id>"
        name: "My Volume"
    protected:
      instances:
        - "<instance-id>"
      volumes:
  - id: "<project-2-id>"
    instances:
      ...
    volumes:
      ...
    protected:
      instances:
      volumes:
  ...

Configure duration

To determine after how many days/weeks/months/... you want snapshots to be delete, use duration option.
This option uses PHP DateInterval format : http://php.net/manual/en/dateinterval.construct.php, (*4)

The format starts with the letter P, for "period." Each duration period is represented by an integer value followed by a period designator. If the duration contains time elements, that portion of the specification is preceded by the letter T., (*5)

Here are some simple examples. Two days is P2D. Two seconds is PT2S. Six years and five minutes is P6YT5M., (*6)

You can protect snapshots from deletion by setting its id in protected.instances or protected.volumes., (*7)

Run

php snapshot.php

Dry-run mode (simulates the query) :, (*8)

php snapshot.php --dry-run

Crontab

You can automate the snapshot creation by creating a crontab making a call to this tool., (*9)

The Versions

30/07 2018

dev-dependabot/composer/symfony/yaml-4.1.2

dev-dependabot/composer/symfony/yaml-4.1.2

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

02/07 2018

dev-master

9999999-dev

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0 GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

31/05 2018

dev-dependabot/composer/symfony/yaml-4.1.0

dev-dependabot/composer/symfony/yaml-4.1.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

01/05 2018

dev-dependabot/composer/symfony/yaml-4.0.9

dev-dependabot/composer/symfony/yaml-4.0.9

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

06/03 2018

dev-dependabot/composer/symfony/yaml-4.0.6

dev-dependabot/composer/symfony/yaml-4.0.6

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

04/03 2018

v1.2.2

1.2.2.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

26/02 2018

v1.2.1

1.2.1.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

19/02 2018

v1.2.0

1.2.0.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

09/02 2018

v1.1.2

1.1.2.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Jonathan Beliën

04/12 2017

v1.1.1

1.1.1.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0

The Requires

 

by Jonathan Beliën

04/12 2017

v1.1.0

1.1.0.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0

The Requires

 

by Jonathan Beliën

19/06 2017

v1.0.0

1.0.0.0

OVH Cloud Automated Snapshot (via OVH API)

  Sources   Download

GPL-3.0

The Requires

 

by Jonathan Beliën