From 559129d94467550faf0c17792af013af13c13e87 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 24 Dec 2024 15:17:19 +0100 Subject: [PATCH] add documentation --- README.md | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34f114f..cecd771 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,102 @@ -# proxmox-backup +proxmox-backup +============== +This ansible role : + - installs proxmox-backup-client on host + - copy a custom backup script + +It has been successfully tested on : + - Debian "Bullseye" 11 + - Debian "Bookworm" 12 + +Custom backup script +-------------------- + +The custom script : + - copy & compress the entire system + - extract informations from your system (packages list, crontab, partition table, etc) + - can dump MySQL database(s) + - can dump PostgreSQL database(s) + +All files are then send it to a custom Proxmox Backup Server. + +Role variables +--------------- + +| Variable | Type | Choices | Default | Comment | +|---------------------------|---------|------------------|--------------------------------------------------------------------------------------|-----------------| +| pbs_debian_release_name | string | | bookworm | | +| pbs_repo_key | string | | https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg | | +| pbs_repo_no_subscription | string | | deb http://download.proxmox.com/debian/pbs-client {{ pbs_debian_release_name }} main | | +| pbs_user | string | | | mandatory | +| pbs_server | string | | | mandatory | +| pbs_datastore | string | | | mandatory | +| pbs_fingerprint | string | | | mandatory | +| pbs_password | string | | | mandatory | +| backup_dir | string | | | mandatory | +| backup_local_retention | string | | | mandatory | +| backup_path_include | dict | | | | +| - path: /etc list | string | | | | +| - path: /var/www list | string | | | | +| fs_mount: true list | boolean | | | | +| backup_path_exclude | list | | | | +| backup_mysql_enabled | boolean | | | | +| backup_postgreslq_enabled | boolean | | | | +| backup_cron_minute | int | | | | +| backup_cron_hour | int | | | | + +Dependencies +------------ + +None. + +Example Playbook +---------------- + +``` + - hosts: example + ignore_errors: "{{ ansible_check_mode }}" # ignore errors only in check mode ! + + roles: + - { role: proxmox-backup, tags: ['proxmox-backup'] } +``` + +Example variables +----------------- + +``` +--- +pbs_user: 'my_user' +pbs_server: 'my_pbs_server:8007' +pbs_datastore: 'my_datastore' +pbs_fingerprint: 'aa:bb:cc:dd:ee:ff:' +pbs_password: 'my_password' + +backup_dir: /backup +backup_local_retention: 2 + +backup_path_include: + - path: /etc + - path: /var/www + fs_mount: true + +backup_path_exclude: + - /var/backups + - *.log + - cache/ + +backup_mysql_enabled: true + +backup_cron_minute: 30 +backup_cron_hour: 5 +``` + +License +------- + +MIT Modern + +Author Information +------------------ + +Written by Ludovic Cartier