backupbot
is a easy to use tool for creating (automatic) backups on FreeBSD. Currently files and mysql databases are supported, but more features can be added in the future.
- Easy to use: get started in just a couple of minutes.
- Backup files and mysql databases: daily and weekly backups with optional compression and encryption.
- Configurable settings: customize your backups, ownership, permissions, retention, schedule and random delay.
- Made for FreeBSD: compatible with basic shell.
It's quite easy! Adjust the settings of /usr/local/etc/backupbot.conf
to taste and run backupbot --backup
to start the backup process. To effectuate the chosen schedule for automatic backups, use backupbot --cron
and backupbot
will take care of the rest.
If both mysql
and files
features have been enabled, the output of the backup will look something like this:
root@server:~ # ls -all -h /data/backup/
drwxr-xr-x 2 root wheel 512B Jul 1 15:36 .
drwxr-xr-x 4 root wheel 1.0K Jun 29 23:52 ..
-rw-r--r-- 1 root wheel 162K Jul 1 03:00 200701T0300-blog.sql.xz
-rw-r--r-- 1 root wheel 896M Jul 1 03:00 200701T0300-files.tar.xz
-rw-r--r-- 1 root wheel 66K Jul 1 03:00 200701T0300-cloud_test.sql.xz
-rw-r--r-- 1 root wheel 16M Jul 1 03:00 200701T0300-wp.sql.xz
Use botmanager or install manually:
- Copy
backupbot
to/usr/local/bin/backupbot
(owner=root
, group=wheel
, permissions=555
(read & execute). - Copy
backupbot.conf
to/usr/local/etc/backupbot.conf
and adjust the settings to taste. - Optionally add the chosen schedule to a automatic cronjob with
backupbot --cron
.
This will look something like:
# install backupbot
wget https://raw.githubusercontent.com/nozel-org/freebsd-backupbot/master/backupbot -O /usr/local/bin/backupbot
chown root:wheel /usr/local/bin/backupbot
chmod 555 /usr/local/bin/backupbot
wget https://raw.githubusercontent.com/nozel-org/freebsd-backupbot/master/backupbot.conf -O /usr/local/etc/backupbot.conf
nano /usr/local/etc/backupbot.conf
backupbot --cron
The manual provides some more insight in to backupbot. If you have questions, suggestion or find bugs, please let us know via Issues and Discussions.
- Fixed layout inconsistency in log format.
- Fixed legacy reference to /usr/bin in option_cron.
- Added configurable automatic permissions of backups.
- Log entries are now more informational.
- Added a optional random delay for backups to spread out the potential load of multiple servers starting their backups at the same time.
- Error messages are more clear and refer to the relevant variable in the configuration file.
- Replaced echo with printf for consistency.
- Added configurable automatic ownership of backups.
- Added rudimentary logging of backupbot's actions.
- Fixed a bug that would show an error when using --version or --help was used if the configuration file wasn't configured properly.
- Refactored encryption feature to be configurable for every backup feature instead of it being a general setting.
- Simplified the configuration of encryption by reducing the required configuration variable to one.
- Improved default settings and removed unneeded checks on default values.
- Fixed a bug where choosing 00:00 as the daily backup time would not work properly.
- Expanded and improved the backupbot manual.
- Added daily backup and weekly backup cycles.
- Extended automatic cron generation to include daily and weekly backup cycles.
- Extended retention to include daily and weekly backup cycles.
- Changed backup file names to reflect whether its a daily, weekly or manual backup.
- Changed the order of backup file name components to be more easy to read.
- Made default configuration file more compact and easy to read.
- Made some variable names more consistent.
- Added more compression alternatives: no compression, gzip, bzip2 and xz.
- Fixed a bug in retention feature.
- Switched from STABLE to RELEASE tag for releases.
- Refactored retention feature to keep working when user switches from encrypted to unencrypted backups and vice versa.
- Added support for automatic removal of old backups/retention.
- Added support for symmetrical encryption of backups.
- First stable release.
- Added support for backing up files.
- Added support for backing up mysql databases.
- Added support for automatic backup based on cron.
- Added creation of cronjob based on backupbot.conf.
- Added configurable settings for backup features and cron in backupbot.conf.