yvwntr

Using OVH PCA with backupninja

Motivation

OVH provides a cheap way for longterm storing backup data, the Public Cloud Archive (PCA). As this is for write-once data (cold data store), it needs to be used together with a little bit more expensive hot data store for meta data when used for sequential backups. The backup solution duplicity is capable of using such multi backends. backupninja provides a nice solution for a standardized configuration of duplicity and running it automatically.

Prerequisites

On system to backup

GPG

# gpg --edit-key KEY_ID
> trust
>  5
> quit

On OVH

Install python modules

Configuration

/etc/backup.d/20_ovh_pca.dup

options = --archive-dir /tmp --file-prefix-manifest 'hot_' --file-prefix-signature 'hot_' --file-prefix-archive 'cold_'
testconnect = no

[gpg]
sign = yes
encryptkey = GPGKEY
password = GPGKEYPASSWORD

[source]
include = SOMEDIR
include = SOMEOTHERDIR

[dest]
desturl = 'multi:///etc/ovh-config.json?mode=mirror&onfail=abort'

/etc/ovh-config.json

backup

restore

duplicity --file-prefix-manifest 'hot_' \\
		  --file-prefix-signature 'hot_' \\
		  --file-prefix-archive 'cold_' \\
		  --encrypt-key EXAMPLEKEYID \\
		  --sign-key EXAMPLEKEYID \\
		  --path-to-restore PATH/IN/BACKUP \\
		  restore 'multi:///PATH/TO/ovh-config.json?mode=mirror&onfail=abort' LOCAL/SUBFOLDER