Skip to content

YasnaTeam/db-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

GoBackup 💾

GoBackup is a mysqldumper wrapper to full/partial backup and/or compress mysql databases.

Download

You can download the release file from releases page.

Usage

You can see usage with --help flag

Flag Usage Default
t name of table(s) you want to dump comma separated. *
n output file name dump
p output file path
f output file type (sql,zip,gz) sql
d add date to output file false
i input file path
db_user database user name
db_pass database user password
db_host database host
db_name database name
db_port database port number 3306
config database config file

Example usage :

gobackup -f gz -config /laravel/.env -n out  

This command will create a file named out and out.gz by dumping all tables with connection info of .env file

Import Command

You can also import a sql file with any of these mime-types (sql,gz,zip):

gobackup -i path/to/file.sql -config /laravel/.env

Build Executable From Source

You May build the executable file with following command :

go build -ldflags="-s -w"
Flags are for decreasing output size

Contribution 💌

Fork project and send PR to me ❤️