Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/MartinBoehmer/hc-volume-backup
Bash script to backup Hetzner Cloud Volumes. Automatically creates volumes for backups and maintains a defined number of them.
https://gitlab.com/MartinBoehmer/hc-volume-backup
Last synced: about 1 month ago
JSON representation
Bash script to backup Hetzner Cloud Volumes. Automatically creates volumes for backups and maintains a defined number of them.
- Host: gitlab.com
- URL: https://gitlab.com/MartinBoehmer/hc-volume-backup
- Owner: MartinBoehmer
- License: apache-2.0
- Created: 2019-12-07T11:47:51.991Z (about 5 years ago)
- Default Branch: master
- Last Synced: 2024-08-03T21:02:32.371Z (5 months ago)
- Stars: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
- awesome-hcloud - HC Volume Backup
README
# About
Bash script to backup Hetzner Cloud Volumes. Automatically creates volumes for backups and maintains a defined number of them.
Steps performed:
1. Query details about source volume
2. Create and mount new volume (target volume, size is source volume size + 1)
3. Copy source volume content to target volume (rsync)
4. Unmount target volume
5. Delete old backup volumes, if there are more than the maximum number to keep (see configuration)# Installation
## Prerequisites
The following packages need to be installed for the script to run.
* Git
* [jq](https://stedolan.github.io/jq/)
* rsync## Installation procedure
1. Clone this repository
2. Copy `example.config`, e. g. to `job1.config`, and adjust the settings
3. Make sure `job1.config` is only readable to users performing the backup# Usage
`backup.sh `
## Example
`cd ~/hc-volume-backup`
`./backup.sh job1.config`