Code Monkey home page Code Monkey logo

db_backup_go's Introduction

使用 go 语言编写的数据库备份工具

功能点

  • 可以对 linux 端 mysql 和 postgresql 数据库进行压缩备份(后续可能会支持更多数据库类型(也许))
  • 可以发送到异机(windows 需要开启 ssh 服务,用户需要设置密码)
  • 可以设置删除 n 天前的旧备份(要查出所有备份并根据时间排序,保留最新的 n 份。因为一天的备份不可同时存在多份,所以不会出现所有的最新n份为同一天备份的情况)
  • 删除旧备份可开启删除异机备份
  • 会记录备份日志和异常日志
  • 支持 amd64 和 arm64 构架

使用方式

  • 在 config.json 配置文件中做相关配置,内有注释说明。在 dbs.txt 中写数据库名称,一行一个。当正向筛选时,会备份这里写到的所有数据库,当反向筛选时,将备份除这里的其他所有数据库。如存在某一行写 all 时,忽略其他行直接全部备份。
  • 配置完成后,放到 db_backup_go_xxx64 执行文件同目录,直接执行 db_backup_go_xxx64 即可

数据库兼容列表

数据库 版本 兼容性
mysql 5.7+
mysql 8.0+
mariadb 10.0+
postgresql 14+

注意:此软件不实现数据备份的主体功能,备份依赖于 mysqldump 8 和 pg_dump。如这些工具本身使用存在报错,那此软件也会报错

db_backup_go's People

Contributors

even0306 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.