Skip to content
/ quimby Public

An open-source small tool written in GO for automating backups of FreeBSD jails managed with Bastille

License

Notifications You must be signed in to change notification settings

tofazzz/quimby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Quimby

An open-source small tool written in GO for automating backups of FreeBSD jails managed with Bastille.

(Quimby: a beginner surfer who is usually annoying)

Requirements

Disclaimer

I am a beginner programmer that wanted to automate the backup of all of my deployed jails on my servers. I use GO as I find it to be the best programming language for my use case and abilities. Please use this tool as your own risk knowing that I probably will not have the time to work on this project full time on a regular basis.

Features

  • If no options are provided, it determines the list of current jails and backup them live in .gz format via ZFS snapshot
  • If on UFS filesystem, it will warn you that jails can be only safely backup (start/stop)
  • By default it removes backup files that are older than 2 days in /usr/local/bastille/backups/
  • If specified with flags, it can optinally safely stop/start jails (for UFS filesystems) and remove backup files according to the retention period provided in number of days
  • Logs activity in /var/log/quimby.log

TODO:

  • Backup running jails only
  • Do not start jails that were already stopped (current known bug)

Installation

Git on FreeBSD

git clone https://github.com/tofazzz/quimby.git
cd quimby
go build -o quimby
chmod +x quimby
mv quimby /usr/local/bin/

Git on other platforms

git clone https://github.com/tofazzz/quimby.git
cd quimby
env GOOS=freebsd GOARCH=amd64 go build -o quimby
chmod +x quimby
mv quimby /usr/local/bin/

Crontab (every day at 1am)

0 1 * * * /usr/local/bin/quimby

Sample Usages

  • quimby
  • quimby safe 4
  • quimby live 9

CMD options:

  • none: hot backup jails and remove backups older than 2 days.
  • safe: it safely stop jails before backing them up. Required if using UFS filesystem.
  • live: hot backup jails without stopping them.
  • days: number of days of data retention.

About

An open-source small tool written in GO for automating backups of FreeBSD jails managed with Bastille

Resources

License

Stars

Watchers

Forks

Languages