承接 jbelien/ovh-cloud-snapshot 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jbelien/ovh-cloud-snapshot

Composer 安装命令:

composer create-project jbelien/ovh-cloud-snapshot

包简介

OVH Cloud Automated Snapshot (via OVH API)

README 文档

README

Latest Stable Version Total Downloads Monthly Downloads

OVH Cloud Automated Snapshot

Requirements

Installation

composer create-project jbelien/ovh-cloud-snapshot

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 :

---
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

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.

统计信息

  • 总下载量: 228
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 26
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 26
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2017-06-14