Easily backup files to an opencloud container
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
composer.json
composer.lock
oc-backup.php
sample.config.json

README.md

Backup with OpenCloud

... especially with OVH

Inspiration

This script is very inspired from https://gist.github.com/BaptisteDixneuf/85dc4419a0398446d2d3

Thank you BaptisteDixneuf :)

Moreover, this gist is also a good documentation to initialize the storage.

Installation

git and composer must be present.

git clone https://github.com/partageit/php-opencloud-backup.git
cd php-opencloud-backup
composer install

Usage

To start backup of /home/me/photos/*.jpeg in the container photos-2016 reading credentials from config.json:

php oc-backup.php --files=/home/me/photos/*.jpeg --container=photos-2016 --config=config.json

For further details, type:

php oc-backup.php --help

Configuration file

{
	"authUrl": "https://auth.cloud.ovh.net/v2.0",
	"username": "",
	"password": "",
	"tenant": "",
	"swiftUrl": "",
	"serviceName": "swift",
	"region": ""
}

Where:

  • authUrl: Access point to the Identity service, defined in "Accès et sécurité/Accès API"
  • username: Horizon user
  • password: Horizon password
  • tenant: OS_TENANT_NAME value from the RC OpenStack file
  • swiftUrl: Access point to the Object store service, defined in "Accès et sécurité/Accès API"
  • serviceName: Always swift?
  • region: the region name, in GRA1, SBG1, ...

License