Coder Social home page Coder Social logo

digineo / zackup Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 3.0 303 KB

Backup to ZFS. Inspired by BackupPC

License: GNU General Public License v3.0

Makefile 0.52% Go 94.32% Shell 0.10% HTML 5.07%
backup zfs zfs-snapshots backup-tool golang go backuppc rsync

zackup's People

Contributors

corny avatar dependabot[bot] avatar dmke avatar ngharo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zackup's Issues

Stale state in server after CLI invokation

When zackup runs as daemon, executing commands like zackup run (and in the future probably also zackup prune, #3) causes the global state to become stale. While the effect is mostly of cosmetic nature (timestamps and usage statistics in the UI), the metrics exported to Prometheus are just wrong.

There are two ways to mitigate this: Either nudge the server to reload the state, or pass the command to the server instance, execute it there and return the output to the CLI process.

In both cases, the server needs to maintain a form of IPC mechanism (the HTTP server is already present, but a Unix socket has less overhead).

  • By exposing it via HTTP, a "reload" button in the UI could become feasible as well.
  • Discovering whether a server runs in the background is easier with a Unix socket (it's a file in /var/run), because the server's HTTP listen address could be anything (it is given at the command line, not defined in the config file).
  • A third option is sending SIGHUP or similar to the server process to trigger a reload (though we'd need to know the server's PID).

Pruning old snapshots

I modeled a program closely after borg backup prune command to clean up old zackup snapshots on my server.

I'm considering adding a zackup prune command. It would read the config for daily, weekly, monthly and yearly "keep counts" and prune snapshots accordingly. I want to make sure that this is a feature you all would accept before I start working on the integration.

I can elaborate on more details if interested.

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.