GithubHelp home page GithubHelp logo

proxmox-autosnap's People

Contributors

apprell avatar jocelynj avatar waaromzomoeilijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

proxmox-autosnap's Issues

How to make the snapshot run in minutes and not just hourly

Hello @apprell ,

I'm curious if I can modify this to allow for a snapshot in minutes instead of hourly being the shortest time frame to take a snapshot. I was hoping to take a snapshot on one particular VM every 5 minutes or 10 minutes. is this is possible what would I need to change please in order to achieve this?

Thank you in advance for any advice you can provide me.

UnicodeDecodeError while trying to remove a snap when accentuated characters in old snap description

I got the following error while testing autosnap on my LXC containers.

Traceback (most recent call last):
  File "/root/proxmox-autosnap/proxmox-autosnap.py", line 119, in <module>
    remove_snapsot(vmid=k, virtualization=v, label=argp.label, keep=argp.keep, mute=argp.mute)
  File "/root/proxmox-autosnap/proxmox-autosnap.py", line 25, in create_pid
    return func(*args, **kwargs)
  File "/root/proxmox-autosnap/proxmox-autosnap.py", line 68, in remove_snapsot
    snapshots = run_command([virtualization, 'listsnapshot', vmid])
  File "/root/proxmox-autosnap/proxmox-autosnap.py", line 35, in run_command
    return {'status': True, 'message': out.decode('utf-8').rstrip()}
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 45: invalid continuation byte

It's due to the fact that one of my containers has already a snap with accentuated characters in the comment.

Once the accentuated character removed, the process runs smoothly

When run in cron date-iso-format not respected

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

Incorrect pid file handling

If an instance is running and a second instance starts, it correctly finds the 1st instance's pid file and exits but the finally deletes the pid file. When the 1st instance completes and tries to clean up the pid, it throws exceptions as the file was deleted by the 2nd instance.

Traceback (most recent call last):
  File "/usr/local/sbin/proxmox-autosnap.py", line 171, in <module>
    main()
  File "/usr/local/sbin/proxmox-autosnap.py", line 27, in create_pid
    os.unlink(location_pid)
FileNotFoundError: [Errno 2] No such file or directory: '/root/proxmox-autosnap/running.pid'

Add ability to send replication

Hello, I love this script, tks for sharing! But it would be nice to add the ability to send the replication. Is that possible?

Thank you

How to add sending an email when autosnap has finished

Hello @apprell ,

I really appreciate you providing this script for all to use! I think this is critical within Proxmox.

I'd like to add the function to send me an email when the auto_snap has successfully completed...or perhaps even better if auto_snap failed to complete for some reason. How would I do this? Do I add it to my cron job? Are there parms I need to use to verify the success of the auto_snap completing?

Also, is there a setting within auto_snap to include RAM when the snapshot is taken?

Thanks in advance for any advice you can provide me.

Script already running under PID

We are getting this error,
Script already running under PID xxxxxx , skipping execution
the number is always the same and the snapshots never happen.

using it on Proxmox 7.3-3
I cannot find the PID with ps -aux | grep xxxxxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.