1
0
mirror of https://github.com/vaniacer/DDT.git synced 2024-11-19 17:01:44 +02:00
Download Dump and Test it
Go to file
2024-11-15 10:43:08 +03:00
.github Create FUNDING.yml 2023-04-26 12:16:31 +03:00
ddt.sh add rsync speed limit 2020-08-19 10:26:04 +03:00
LICENSE Create LICENSE 2023-12-28 11:12:07 +03:00
README.md Update README.md 2024-11-15 10:43:08 +03:00

DDT

Downloads postgresql dumps from servers via rsync over ssh, tests them by restoring on a test DB server.
Sends results to email via mutt(i'm using it cuz it add attachments).

Servers addresses, dump folders, Dump search patterns and test DB names are stored in dbases array in form of a table:

dbases=(
#-----------------------+-------------------+-----------------------------+--------------------------------------+
#    Ssh alias(addr)    |Dump folder(bkpath)| Dump search pattern(dbname) | Test DB name(dbtest) Must be unique! |
#-----------------------+-------------------+-----------------------------+--------------------------------------+
      'moscow'             '/backup'           'data_db_%d.%m.%Y'                   'moscow_data_prod_db'
      'rybinsk'            '/backup/new'       '%Y%m%d_db_data'                     'rybinsk_data_prod_db'
      'yaroslavl'          '/dumps'            'data_db%Y'                          'yar_data_prod_db'
#-----------------------+-------------------+-----------------------------+--------------------------------------+
); N=${#dbases[*]}; C=4

Have fun)!

Twitter Follow paypal Don't hold yourself, buy me a beer)