apprell / proxmox-autosnap

Automatic ZFS Snapshot Script for Proxmox VE 5, 6, 7 and 8
71 stars 15 forks source link

When run in cron date-iso-format not respected #10

Closed soloam closed 1 year ago

soloam commented 1 year ago

Hello, I need to create my snapshoots in date-iso-format so that other system that I use can handle the snapshoots and the replications (I'm only able to manage in this format), when I run "/usr/local/sbin/proxmox-autosnap.py --autosnap --vmid all --label hourly --keep 23 --mute --date-iso-format" in my sheel my snapshoots are with the correct format (autohourly_2023_04_20T11_33_58) but when the same command in run on cron, my naming is "autohourly230420100514", as if date-iso-format is ignored.

This is my crontab:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

######## Auto Snapshoot
# Task for snapshot every hour from 1 through 23.
5 1-23 * * * root /usr/local/sbin/proxmox-autosnap.py --autosnap --vmid all --label hourly --keep 23 --mute --date-iso-format

# Task for snapshot every day-of-month from 2 through 31.
5 0 2-31 * * root /usr/local/sbin/proxmox-autosnap.py --autosnap --vmid all --label daily --keep 30 --mute --date-iso-format

# Task for snapshot at 00:05 on day-of-month 1.
5 0 1 * * root /usr/local/sbin/proxmox-autosnap.py --autosnap --vmid all --label monthly --keep 3 --mute --date-iso-format

Thank you

soloam commented 1 year ago

this was solved, the cron was writen wrong! Tks