Code Monkey home page Code Monkey logo

Comments (6)

emersion avatar emersion commented on August 17, 2024

That would be a good idea :-)

from bups.

emersion avatar emersion commented on August 17, 2024

Just added systemd timers support. There is an issue, you cannot control the backup frequency (it's weekly). You'll have to edit the systemd timer manually to change that.

Do you know how to execute a systemd timer each n days?

from bups.

Edenhofer avatar Edenhofer commented on August 17, 2024

To achieve this I would use the "OnActiveSec=" option in the [Timer] directive, which defines a monotonic timer relative to the moment the timer itself is activated. By the way I would use hours instead because e.g. I would like to make a snapshot every 2 hours or so. Accordingly using something like this works fine for me:

/etc/systemd/system/bup.timer

[Unit]
Description=Run bup every two hours
[Timer]
OnActiveSec=2hr
[Install]
WantedBy=timers.target

If you want to read more specific information about systemd timers please refer to http://www.freedesktop.org/software/systemd/man/systemd.time.html#Parsing%20Time%20Spans and http://www.freedesktop.org/software/systemd/man/systemd.timer.html
And do not forget to trigger a daemon-reload! (https://wiki.archlinux.org/index.php/Systemd)

from bups.

emersion avatar emersion commented on August 17, 2024

Thank you!

I have a question: if I set OnActiveSec=7d, the timer will be executed 7 days after it is activated. But what if the computer is shut down? Will it be executed the next time it is powered on?

from bups.

Edenhofer avatar Edenhofer commented on August 17, 2024

EDIT: The timer is resetted and the unit will run after 7 Days. Therefore this solution only works for machines which one would never turn off.

from bups.

emersion avatar emersion commented on August 17, 2024

Systemd timers are now fully supported.

Concerning backups each 2 hours, for the moment you can edit /etc/systemd/system/bups.timer manually. I've opened a new issue: #5.

from bups.

Related Issues (20)

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.