https://github.com/kvaps/pve-autosnap
Proxmox automatic snapshot tool
https://github.com/kvaps/pve-autosnap
Last synced: about 1 year ago
JSON representation
Proxmox automatic snapshot tool
- Host: GitHub
- URL: https://github.com/kvaps/pve-autosnap
- Owner: kvaps
- License: mit
- Created: 2015-05-22T17:06:31.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-08T12:41:57.000Z (almost 8 years ago)
- Last Synced: 2025-04-12T05:54:30.899Z (about 1 year ago)
- Language: Shell
- Size: 34.2 KB
- Stars: 36
- Watchers: 7
- Forks: 22
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pve-autosnap
Proxmox automatic snapshot tool
## Usage
```bash
Usage: pve-snap --mode [--storage=STORAGENAME] [--leave=NUMBER]
Example: pve-snap --weekly --storage=ceph --leave=2
or: pve-snap --yearly --storage=pve-data
or: pve-snap -d -s stor -l 4
Arguments:
-d, --daily Run this script in mode for daily autosnapshots
-w, --weekly Run this script in mode for weekly autosnapshots
-m, --monthly Run this script in mode for monthly autosnapshots
-y, --yearly Run this script in mode for yearly autosnapshots
-s, --storage=STORAGENAME Specify the storage name for which will be used auto snapshots
(0 or not specified will enable for all
-l, --leave=NUMBER Specify the number of snapshots which should will leave, anything longer will be removed
(0 or not specified will disable removing snapshots)
```
## Enable pve-autosnap
Just add your rules to crontab, example:
```bash
STORAGE=local
crontab -l > crontab.txt
cat >> crontab.txt << EOF
# Daily snapshot
0 3 * * 1-6 /bin/pve-autosnap --daily --storage=$STORAGE --leave=3
# Weekly snapshot
0 3 * * 7 /bin/pve-autosnap --weekly --storage=$STORAGE --leave=3
# Monthly snapshot
0 3 1 * * /bin/pve-autosnap --monthly --storage=$STORAGE --leave=4
EOF
crontab crontab.txt
rm crontab.txt
```