Download the PHP package jbelien/ovh-cloud-snapshot without Composer
On this page you can find all versions of the php package jbelien/ovh-cloud-snapshot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbelien/ovh-cloud-snapshot
More information about jbelien/ovh-cloud-snapshot
Files in jbelien/ovh-cloud-snapshot
Package ovh-cloud-snapshot
Short Description OVH Cloud Automated Snapshot (via OVH API)
License GPL-3.0-or-later
Informations about the package ovh-cloud-snapshot
OVH Cloud Automated Snapshot
Requirements
Installation
Configuration
First step
Create credentials by clicking here !
- 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 :
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
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.
Here are some simple examples. Two days is P2D. Two seconds is PT2S. Six years and five minutes is P6YT5M.
You can protect snapshots from deletion by setting its id in protected.instances or protected.volumes.
Run
php snapshot.php
Dry-run mode (simulates the query) :
php snapshot.php --dry-run
Crontab
You can automate the snapshot creation by creating a crontab making a call to this tool.
