A Simple CLI Tool to Back Up Your Databases and Files
As developers, we know data is precious. Whether it's a production database, a collection of configuration files, or a local project directory, losing it is not an option. Setting up reliable, automated backups, however, often gets pushed to the "someday" list. It can feel like a chore involving complex scripts, cloud provider APIs, and cron job debugging.
That's where GoBackup comes in. It's an open-source CLI tool that cuts through the complexity. It offers a straightforward, declarative way to automate backups of your databases and files to a variety of cloud storage services. Think of it as a unified, configurable pipeline for your peace of mind.
What It Does
GoBackup is a single binary tool written in Go. You define what you want to back up (MySQL, PostgreSQL, Redis, directories, etc.) and where you want to send it (S3, Google Cloud Storage, SFTP, local storage, and more) in a simple YAML configuration file. Then, you run it manually or set it up on a schedule. It handles the compression, encryption, and transfer, keeping a tidy archive of your backups.
Why It's Cool
The beauty of GoBackup is in its simplicity and its single-purpose design. It doesn't try to be a full DevOps platform. Instead, it does one job well.
- Unified Configuration: You manage everything—your databases, files, and storage destinations—in one clean
gobackup.ymlfile. No need to juggle separate scripts for PostgreSQL and your uploads directory. - Database Agnostic: It comes with built-in "dumpers" for the usual suspects: MySQL, PostgreSQL, Redis, MongoDB, and even supports piping in custom commands for anything else.
- Storage Flexibility: Your backup isn't locked in. You can send it to multiple places simultaneously (like S3 and a local NAS) with a few lines of config.
- Encryption Ready: You can easily integrate GnuPG to encrypt your backups before they ever leave your server, adding a crucial layer of security.
- It's Just a Binary: No language runtime dependencies. You download it, configure it, and run it. This makes it incredibly easy to deploy on any server.
How to Try It
Getting started is straightforward. The easiest way is to download the latest release for your platform from the GitHub Releases page.
-
Download and install:
# Example for Linux/macOS wget https://github.com/gobackup/gobackup/releases/download/v2.0.0/gobackup-linux-amd64.zip unzip gobackup-linux-amd64.zip sudo mv gobackup /usr/local/bin/ -
Create a config file: Run
gobackup initto generate a samplegobackup.ymlfile in~/.gobackup/. This file is heavily commented and shows you all the options. -
Edit the config: Open
~/.gobackup/gobackup.ymland define your models (backup jobs). A simple model to back up a local directory to a folder might look like this:models: my_app_backup: storages: local: type: local path: /path/to/backup/destination/ archives: my_app_data: paths: - /path/to/your/important/data -
Run it: Execute
gobackup performto run a backup immediately. For automation, add it to your crontab:0 2 * * * /usr/local/bin/gobackup perform
For the full setup guide, detailed configuration options, and all supported databases and storages, head over to the main repository: github.com/gobackup/gobackup.
Final Thoughts
GoBackup feels like a tool that was built to solve a real, repetitive problem. It removes the excuse not to have proper backups because it makes the process so simple. It's perfect for solo developers, small teams, or even as a secondary backup system for larger applications. If you've been meaning to solidify your backup strategy but haven't found the time to wire something together, this tool might be the 15-minute solution you've been looking for. Just configure it, forget it, and rest easier knowing your data is safe.
Follow us for more interesting projects: @githubprojects
Repository: https://github.com/gobackup/gobackup