Files
proxmox-backup/README.md
T
2026-05-15 11:28:07 +02:00

101 lines
4.6 KiB
Markdown

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_host_id | string | | | |
| backup_dir | string | | | mandatory |
| backup_local_retention | string | | | mandatory |
| backup_path_include | list | | | |
| backup_path_exclude | list | | | |
| backup_mysql_enabled | boolean | | | uses mysqldump |
| backup_mariadb_enabled | boolean | | | uses mariadb-dump |
| backup_pgsql_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:
- /etc
- /var/www
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 <ludovic.cartier@brainsys.io>