https://github.com/joshhhhyyyy/backup
A simple program to automatically backup a database using git. Err handling by Sentry, Reporting by Betteruptime. Made with 🩸 , 😓 & ðŸ˜
https://github.com/joshhhhyyyy/backup
backup cli git go golang utilities
Last synced: 4 months ago
JSON representation
A simple program to automatically backup a database using git. Err handling by Sentry, Reporting by Betteruptime. Made with 🩸 , 😓 & ðŸ˜
- Host: GitHub
- URL: https://github.com/joshhhhyyyy/backup
- Owner: joshhhhyyyy
- License: unlicense
- Created: 2022-02-26T05:14:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T13:56:52.000Z (over 3 years ago)
- Last Synced: 2026-01-12T01:36:01.405Z (5 months ago)
- Topics: backup, cli, git, go, golang, utilities
- Language: Go
- Homepage: https://sh.joseos.com/backup
- Size: 142 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backup    [](https://github.com/joshhhhyyyy/Backup/releases) [](https://goreportcard.com/report/joshhhhyyyy/Backup)

## What is this?
**A Simple and Lightweight program to automatically backup a database using git.**
Err handling by **[Sentry](sentry.io)**, Uses heartbeats by **[Betteruptime](https://betteruptime.com)**
Made with 🩸 , 😓 & ðŸ˜
## Installation
### Via Go
```go get github.com/joshhhhyyyy/backup```
```go install github.com/joshhhhyyyy/backup```
```export PATH=$PATH:$(go env GOPATH)/bin``` (Add gopath to path)
### Via apt
```echo "deb [trusted=yes] https://apt.joseos.com/ ./" | sudo tee /etc/apt/sources.list.d/joseos.list```
```sudo apt update```
```sudo apt install backup```
## Usage
### Systemd Timers
[Sample Service file](https://github.com/storageroom/storage/blob/main/linux/systemd/floodgit.service) | [Sample Timer file](https://github.com/storageroom/storage/blob/main/linux/systemd/floodgit.timer)
Basically, systemd timers is a great alternative to cronjobs as it can be invoked and controlled via systemctl.
Every timer has a corresponding service file that it invokes when the time specified is hit. In the sample files provided, the timer triggers a backup at 4am and 59seconds daily.
### Manual Usage
This program can also be set with flags, where you can specify the commit message and cronjob tracker of your choice.
```backup [OPTIONS]```
## Options
**note: both single minus "-" and double minus "--" work fine
```-ping=""``` // Optional, Type: string, send a http get request everytime this runs for uptime monitoring
```-message=""``` // Not needed at all, Type: string, optional commit message to pass for manual runs
## Debug Options
```-key=""``` // Optional, Type: string, Custom [Sentry.io](sentry.io) dsn (key url) for project