Compare commits

...

2 Commits

Author SHA1 Message Date
yova 0795449de3 update backup article
2 months ago
yova f0bc42e032 add joefix.it link
2 months ago

@ -1,7 +1,8 @@
Free thoughts for a free mind.
Free software for a free society.
One love. One mind. One power.
---
Das ist eine Baustelle.
One love. One mind. One power.
{{< rawhtml >}}
<div style="font-size: 7em;">
🌍
</div>
{{< /rawhtml >}}

@ -1,7 +1,7 @@
---
title: Using OVH PCA with backupninja
description: Accessing the OVH Public cloud archive with the automated backup tool backupninja using its duplicity backend
date: 2022-03-03
date: 2024-03-06
---
## Motivation
@ -36,17 +36,18 @@ OVH provides a cheap way for longterm storing backup data, the Public Cloud Arch
### On OVH
- Create a new user unter Cloud Archive → Project Management → Users & Roles
- Create new Public Cloud project
- Create a new user unter Public Cloud → Project Management → Users & Roles
- Give the user the Role `ObjectStore operator`
- Note username and **password**
- Get TenandID
- Get TenantID
- click 3 dots on the right of the users row. Click Download OpenStack's RC file. Here you can select a region where the PCA should be set up
- Note the `OS_TENANT_ID`, here you also can extract `OS_USERNAME` and `OS_REGION_NAME`
- Note value of `OS_TENANT_ID`
## Installation
- Be sure to have at least version 0.8.21 of duplicity
- `pip3 install duplicity>=0.8.21 python-swiftclient python-keystoneclient`
## Install python modules
- Be sure to use latest issues, so install python modules with pip:
- `pip3 install duplicity python-swiftclient python-keystoneclient fasteners`
## Configuration
- 3 files are used for this:
@ -60,7 +61,7 @@ OVH provides a cheap way for longterm storing backup data, the Public Cloud Arch
- Most important options are:
```
options = --volsize 200 --archive-dir /tmp --file-prefix-manifest 'hot_' --file-prefix-signature 'hot_' --file-prefix-archive 'cold_'
options = --archive-dir /tmp --file-prefix-manifest 'hot_' --file-prefix-signature 'hot_' --file-prefix-archive 'cold_'
testconnect = no
[gpg]
@ -81,10 +82,24 @@ desturl = 'multi:///etc/ovh-config.json?mode=mirror&onfail=abort'
- This is the **credentials** file for OVH. Get this [template](/texts/ovh-config.json)
- adapt the `url` keys to something meaningful ex. `backedupserver1_cold` and `backedupserver2_hot`. This will be the names of the Cloud Archives resp. Object Stores
- change `PCA_TENANTID` and `SWIFT_TENANTID` to noted `OS_TENANT_ID`
- change `PCA_USERNAME` and `SWIFT_USERNAME` to noted `OS_USERNAME`
- change `PCA_USERNAME` and `SWIFT_USERNAME` to noted username
- do the same for Password and Regionname
- Make sure minimal access rights with `chmod 600`
## testing
- do a test run
- `backupninja -d -n`
## backup
- do a test run
`backupninja -d -n`
- backupninja should start every day at a predefined time as specified in `/etc/backupninja.conf`
## restore
- create a `ovh-conf.json` file for the credentials like for backup
- run (preferably as root, so user ownership can also be restored):
```sh
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
```

@ -4,11 +4,14 @@ menu = "main"
+++
## Jetzt
- The website for my IT services is online: [joefix.it](https://joefix.it)
- I started the app project [MDEditor](https://git.gugelfrei.de/android-fun/mdeditor/src/branch/hauntED) for having a stressless and lean editor. It can push directly to [ghost](https://mary.joefix.it) CMS.
- I successfully finished the Android App developers course at [SGD](https://www.sgd.de). Some of the apps I wrote as excercizes were:
- An [android layout demonstrator](https://git.gugelfrei.de/android-fun/layout)
- A GIS and database demonstrator: [geonotes](https://git.gugelfrei.de/android-fun/geonotes)
- A [weatherapp](https://git.gugelfrei.de/android-fun/multiweatherapp) as demonstrator for android fragments UI, REST-API access and server setup with spring boot.
- Ich verkaufe [upgecyclete Smartphones](https://gugelfrei.de/)
- For that I create a [lineageos distribution](https://git.gugelfrei.de/gugelfrei/local_manifests/src/branch/default/gugelfrei.xml)
- Es kann jetzt auch mit crypto [erworben](https://shop.gugelfrei.de/fon) werden.
- I [push democracy](https://wiz-talk.de/)
- I studierte [ökologische Landwirtschaft an der Uni Kassel](https://www.uni-kassel.de/uni/universitaet/kontakt-und-standorte/standort-witzenhausen/)
- I hatte ziemlich [harte Kritik](/texts/Resümee.pdf) zuletzt
- I wrote a bachelor thesis about [a Conceptual model of Solawi](/texts/conceptual_model_web.pdf) using the valueflows ontology

@ -1,7 +1,7 @@
{{ if ne .Site.Params.hideMadeWithLine true }}
<hr style="margin-top: 20em">
<hr>
© 2023, Johannes Winter<br>
© 2024. Made with ❤️ by Johannes Winter<br>
Find credits in the <a href="https://git.gugelfrei.de/websites/wntr/src/branch/main/README.md" target="_blank">gittea</a>
{{ end }}
<script>

@ -1,6 +1,6 @@
# passed directly to duplicity
options = --volsize 200 --archive-dir /tmp --file-prefix-manifest 'hot_' --file-prefix-signature 'hot_' --file-prefix-archive 'cold_'
options = --archive-dir /tmp --file-prefix-manifest 'hot_' --file-prefix-signature 'hot_' --file-prefix-archive 'cold_'
# default is 0, but set to 19 if you want to lower the priority.
nicelevel = 19

Loading…
Cancel
Save