Code Monkey home page Code Monkey logo

hcloud-snapshot-as-backup's People

Contributors

chessmango avatar fbrettnich avatar kimdre 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  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  avatar  avatar

hcloud-snapshot-as-backup's Issues

Manual execution?

Hi,

I just deployed a docker container (and i'm pretty new to docker). I added;
--restart unless-stopped \ to start the container when the host is rebooted for some reason, so I don't forget to start the container.

I wanted to test the snapshot execution so I don't have to wait until 1 am following the crontab so I ran;
docker exec -it 7f6772ed0a6d python3 snapshot-as-backup.py

this gave me as output;
Starting CronScheduler [0 1 * * *]...

I've waited about 15min but I don't see any snapshots being made. Is it possible somehow? Thanks!

Support for several projects

The possibility to specify multiple API tokens to run the script across multiple Hetzner Cloud projects at the same time.

[Feature] More flexible schedule with rotate-backups

Request

Currently it's only possible to use a cron schedule for defining when snapshots are created. This is nice until you realise that you may require a more complex schedule.

As an example, I would also like to keep X weekly snapshots, keep Y monthly snapshots and Z yearly snapshots (ofcourse without manual intervention).

Possible implementation

Something that can be used to create a more flexible schedule is rotate-backups. This works quite well for things like database backups, so I assume it can be used for this as well.

cron_validor module not found after upgrading to Debian Bookworm

After upgrading to the latest Debian Bookworm I started getting this error message:

/usr/bin/python3 /opt/hcloud-snapshot-as-backup/snapshot-as-backup.py > /dev/null Traceback (most recent call last):

  File "/opt/hcloud-snapshot-as-backup/snapshot-as-backup.py", line 9, in <module>
    from cron_validator import CronScheduler
ModuleNotFoundError: No module named 'cron_validator'

Then if I try to install the module cron-validator with:

pip install cron-validator

I'm getting this:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Any idea what to do?

Thanks.

[Feature] Add human readable datetime format for snapshot names

Problem

Currently you can name the snapshot with for example %name%-%timestamp% format. This will result in something like new-server-1667887200. The problem is, timestamps are not really that human friendly, as you just can't directly see what the date and time is when the snapshot was created.

Proposed

Allow user specified custom datetime format (using for example strftime), and fallback to timestamp as default to avoid breaking change.

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.