Lets you define and run restic commands from a YAML file.
Features:
- YAML allows reuse of repository definitions and command line flags with YAML anchors and aliases
- Automatically set
--parent
flag to snapshot ID of the last backup
Define and run restic commands from a YAML file.
i.e. prestic run [COMMAND1] [COMMAND2] ...
Add integration tests using bats or the like.
Things to test:
Ideally it would execute the commands in order as defined in the config file, but right now it's arbitrary (maybe because go maps aren't insertion ordered). This means prune and forgets could run before backups.
Suggestions:
The idea is to run prestic install-launchd
on macOS to install prestic as a launchd task that runs on a recurring schedule. Similar to anacron launchd can handle computer sleeps better than cron.
It might be useful to maintain pieces of the prestic configuration in separate files in /etc/prestic.d
, for example on systems where applications may install their own config.
Add a command like the following:
prestic shell my_backup
...that spawns a sub-shell with env vars pre-loaded from the specified command. It could also populate special env vars with command flags and arguments. The idea is to make it easy to poke around a repo with restic commands. This of course requires the config use environment variables in preference to CLI flags, although it could try to be fancy and convert flags to env vars where possible.
# In the shell, can maybe use special env vars to re-create the command
restic "${PRESTIC_FLAGS}" "${PRESTIC_ARGS}"
# or perhaps create an aliased command that includes the flags
restic_with_flags "${PRESTIC_ARGS}"
Ideas:
Take a look at logrus
Some potential downsides to the state file for tracking snapshot IDs:
So far it's only used for the autoparent
option. Could we lookup the snapshot ID by tag instead?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.