You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
John Olheiser f755f07426
Add hidden systemd files
2 months ago
cmd Add hidden systemd files 2 months ago
database Add some tests and clean up Backup struct 2 months ago
systemd Add hidden systemd files 2 months ago
.gitignore Initial commit 2 months ago
HELP.txt Initial commit 2 months ago
LICENSE Initial commit 2 months ago
Makefile Initial commit 2 months ago
README.md Add hidden systemd files 2 months ago
go.mod Initial commit 2 months ago
go.sum Initial commit 2 months ago
main.go Initial commit 2 months ago

README.md

bk

🍔👑

Backup your memory!

Help

Motivation

Whenever I go to deploy a new binary, I have a habit of mving the file to the same name with a .bk extension, just in case the new one fails.

The problem is...I usually forget to remove it if the new file works cleanly.

bk allows me to bk file, which moves it to file.bk and updates a local databse with the expiration time (set via --for <duration> or --until <time>)
Next time bk --clean is invoked (via cron or systemd timer, perhaps?), bk checks the local DB and attempts to remove expired backups.

Systemd

To get a sample systemd service (bk.service)

bk --systemd-service

To get a sample systemd timer (bk.timer)

bk --systemd-timer

License

MIT