)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Koffi Nogbe \u003ckn4078@att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-06 18:49:04 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add mariadb and postgresql backup capability"},{"line_number":8,"context_line":"* backup script for mariadb and postgres"},{"line_number":9,"context_line":"* restore script for mariadb and postgres"},{"line_number":10,"context_line":"* cronjob for automated backup mariadb and postgres"},{"line_number":11,"context_line":"* add parameters to values.yaml"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_096598b5","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":40},"updated":"2019-03-07 09:58:55.000000000","message":"Thank you for your contribution! There is usually a blank line between the commit title and the commit message. Can we have it added, please?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"2c871e91a14c83f85c3b3c5525295f5e4cc1a423","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add mariadb and postgresql backup capability"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* backup script for mariadb and postgres"},{"line_number":10,"context_line":"* restore script for mariadb and postgres"},{"line_number":11,"context_line":"* cronjob for automated backup mariadb and postgres"},{"line_number":12,"context_line":"* add parameters to values.yaml"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5fc1f717_892243b8","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":41},"updated":"2019-03-15 14:15:54.000000000","message":"There is no restore script.","commit_id":"7052a7bd7794a2705dbfc1a83cb8f03e0c5b2772"}],"mariadb/README.rst":[{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    kubectl label nodes openstack-control-plane\u003denabled --all"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The chart also includes backup capability for the database. The capability "},{"line_number":41,"context_line":"can be toggle enabled or disabled. It implements a backup script and a "},{"line_number":42,"context_line":"cronjob that periodically creates a pod and run the backup script."},{"line_number":43,"context_line":"The script is using ``mysqldump`` utility to take the backup of all "}],"source_content_type":"text/x-rst","patch_set":16,"id":"5fc1f717_72afc029","line":40,"range":{"start_line":40,"start_character":74,"end_line":40,"end_character":75},"updated":"2019-03-15 16:19:45.000000000","message":"whitespace","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    kubectl label nodes openstack-control-plane\u003denabled --all"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The chart also includes backup capability for the database. The capability "},{"line_number":41,"context_line":"can be toggle enabled or disabled. It implements a backup script and a "},{"line_number":42,"context_line":"cronjob that periodically creates a pod and run the backup script."},{"line_number":43,"context_line":"The script is using ``mysqldump`` utility to take the backup of all "},{"line_number":44,"context_line":"databases. There is a default set of parameter define for ``mysqldump`` but"}],"source_content_type":"text/x-rst","patch_set":16,"id":"5fc1f717_12aafc17","line":41,"range":{"start_line":41,"start_character":70,"end_line":41,"end_character":71},"updated":"2019-03-15 16:19:45.000000000","message":"whitespace","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"The chart also includes backup capability for the database. The capability "},{"line_number":41,"context_line":"can be toggle enabled or disabled. It implements a backup script and a "},{"line_number":42,"context_line":"cronjob that periodically creates a pod and run the backup script."},{"line_number":43,"context_line":"The script is using ``mysqldump`` utility to take the backup of all "},{"line_number":44,"context_line":"databases. There is a default set of parameter define for ``mysqldump`` but"},{"line_number":45,"context_line":"can be alter at anyone convenience through ``values.yaml``. There is a "},{"line_number":46,"context_line":"rotation that keep the backup for a define time. All parameters to the job"}],"source_content_type":"text/x-rst","patch_set":16,"id":"5fc1f717_32a5b847","line":43,"range":{"start_line":43,"start_character":67,"end_line":43,"end_character":68},"updated":"2019-03-15 16:19:45.000000000","message":"whitespace","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"cronjob that periodically creates a pod and run the backup script."},{"line_number":43,"context_line":"The script is using ``mysqldump`` utility to take the backup of all "},{"line_number":44,"context_line":"databases. There is a default set of parameter define for ``mysqldump`` but"},{"line_number":45,"context_line":"can be alter at anyone convenience through ``values.yaml``. There is a "},{"line_number":46,"context_line":"rotation that keep the backup for a define time. All parameters to the job"},{"line_number":47,"context_line":"can be alter through ``values.yaml`` in ``conf-\u003ebackup`` key."}],"source_content_type":"text/x-rst","patch_set":16,"id":"5fc1f717_d265541f","line":45,"range":{"start_line":45,"start_character":70,"end_line":45,"end_character":71},"updated":"2019-03-15 16:19:45.000000000","message":"whitespace","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"}],"mariadb/templates/bin/_backup_mariadb.sh.tpl":[{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE"},{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_09511837","line":25,"range":{"start_line":25,"start_character":10,"end_line":25,"end_character":29},"updated":"2019-03-07 09:58:55.000000000","message":"Variable name is not clear.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE"},{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_0e3a7535","line":25,"range":{"start_line":25,"start_character":10,"end_line":25,"end_character":29},"in_reply_to":"5fc1f717_09511837","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE"},{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a927a464","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":25},"updated":"2019-03-07 09:58:55.000000000","message":"What is this variable used for?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":25,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE"},{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_4e195dd5","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":25},"in_reply_to":"5fc1f717_a927a464","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"},{"line_number":32,"context_line":"user\u003d$DBUSER"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_6921bc4d","line":29,"range":{"start_line":29,"start_character":10,"end_line":29,"end_character":20},"updated":"2019-03-07 09:58:55.000000000","message":"credentials","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"},{"line_number":32,"context_line":"user\u003d$DBUSER"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_891e680a","line":29,"range":{"start_line":29,"start_character":34,"end_line":29,"end_character":44},"updated":"2019-03-07 09:58:55.000000000","message":"credentials","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":26,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"},{"line_number":32,"context_line":"user\u003d$DBUSER"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_ee8289c8","line":29,"range":{"start_line":29,"start_character":10,"end_line":29,"end_character":20},"in_reply_to":"5fc1f717_6921bc4d","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"},{"line_number":32,"context_line":"user\u003d$DBUSER"},{"line_number":33,"context_line":"password\u003d$DBPASSWD"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_c45bf72b","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":20},"updated":"2019-03-07 09:58:55.000000000","message":"Wouldn\u0027t we need to have appropriate permissions set onto the file here with umask?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":27,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":28,"context_line":"echo $MARIADB_BACKUP_CRED"},{"line_number":29,"context_line":"#Creating credential file to hide credential from command line"},{"line_number":30,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":31,"context_line":"[client]"},{"line_number":32,"context_line":"user\u003d$DBUSER"},{"line_number":33,"context_line":"password\u003d$DBPASSWD"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_8e73c515","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":20},"in_reply_to":"5fc1f717_c45bf72b","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"password\u003d$DBPASSWD"},{"line_number":34,"context_line":"host\u003d$DBHOST"},{"line_number":35,"context_line":"EOF"},{"line_number":36,"context_line":"check_backup() {"},{"line_number":37,"context_line":"  ret\u003d$1"},{"line_number":38,"context_line":"  dumpfile\u003d$2"},{"line_number":39,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a9dc8446","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":12},"updated":"2019-03-07 09:58:55.000000000","message":"Would be good to have functions and parts of the script to be surrounded by blank lines, to make it easier to read. The name of the function does not really represent what the function does.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  echo $check"},{"line_number":46,"context_line":"}"},{"line_number":47,"context_line":"DBNAME\u003d( `echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027`)"},{"line_number":48,"context_line":"#check if there is a database to backup if not exit"},{"line_number":49,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":50,"context_line":"then"},{"line_number":51,"context_line":"  echo \"There is no database to backup\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a9832404","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":51},"updated":"2019-03-07 09:58:55.000000000","message":"#check if there is a database to backup, otherwise exit","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  echo \"There is no database to backup\""},{"line_number":52,"context_line":"  exit 1"},{"line_number":53,"context_line":"fi"},{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_0994b836","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":59},"updated":"2019-03-07 09:58:55.000000000","message":"It is not checked. It\u0027s just created.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  echo \"There is no database to backup\""},{"line_number":52,"context_line":"  exit 1"},{"line_number":53,"context_line":"fi"},{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_19e2c104","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":59},"in_reply_to":"5fc1f717_0994b836","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  exit 1"},{"line_number":53,"context_line":"fi"},{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_69a21c9d","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":21},"updated":"2019-03-07 09:58:55.000000000","message":"`mkdir -p $BACKUPS_DIR $ARCHIVE_DIR`","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  exit 1"},{"line_number":53,"context_line":"fi"},{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_b9e60d16","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":21},"in_reply_to":"5fc1f717_69a21c9d","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":60,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_29ac148b","line":57,"range":{"start_line":57,"start_character":1,"end_line":57,"end_character":8},"updated":"2019-03-07 09:58:55.000000000","message":"Dumping","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":54,"context_line":"#check if local .backups directory exists. if not create it"},{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":60,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_39bc5ddb","line":57,"range":{"start_line":57,"start_character":1,"end_line":57,"end_character":8},"in_reply_to":"5fc1f717_29ac148b","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":60,"context_line":"then"},{"line_number":61,"context_line":"  #TODO: This can be convert into mail alert of alert send to a monitoring system"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_49c2c035","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":159},"updated":"2019-03-07 09:58:55.000000000","message":"It would be very useful to provide safe defaults for the mysqldump command line options, and let users run mysqldump with their own set of options.\nLines in scripts should be wrapped so that they fit in screen. Wrapping at 80, 90 or 100 would work good here.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":55,"context_line":"mkdir -p $BACKUPS_DIR"},{"line_number":56,"context_line":"mkdir -p $ARCHIVE_DIR"},{"line_number":57,"context_line":"#Dumpinp the database"},{"line_number":58,"context_line":"mysqldump --single-transaction --quick --skip-opt --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":59,"context_line":"if [ $(check_backup \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":60,"context_line":"then"},{"line_number":61,"context_line":"  #TODO: This can be convert into mail alert of alert send to a monitoring system"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_d9cc398b","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":159},"in_reply_to":"5fc1f717_49c2c035","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  exit 1"},{"line_number":65,"context_line":"else"},{"line_number":66,"context_line":"  #Archive the current db files"},{"line_number":67,"context_line":"  DATE\u003d$(date +\"%m_%d_%Y_%H_%M_%S\")"},{"line_number":68,"context_line":"  CURRENT_DIR\u003d`pwd`"},{"line_number":69,"context_line":"  cd $BACKUPS_DIR"},{"line_number":70,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_c91230b2","line":67,"range":{"start_line":67,"start_character":2,"end_line":67,"end_character":35},"updated":"2019-03-07 09:58:55.000000000","message":"This date format does not allow for easy visual sorting.\nDATE variable here does not represent neither the date/time when backup has started, not the date/time when backup has finished. It would be better to have the date/time when backup has started here.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  exit 1"},{"line_number":65,"context_line":"else"},{"line_number":66,"context_line":"  #Archive the current db files"},{"line_number":67,"context_line":"  DATE\u003d$(date +\"%m_%d_%Y_%H_%M_%S\")"},{"line_number":68,"context_line":"  CURRENT_DIR\u003d`pwd`"},{"line_number":69,"context_line":"  cd $BACKUPS_DIR"},{"line_number":70,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_d473a0e6","line":67,"range":{"start_line":67,"start_character":2,"end_line":67,"end_character":35},"in_reply_to":"5fc1f717_c91230b2","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":65,"context_line":"else"},{"line_number":66,"context_line":"  #Archive the current db files"},{"line_number":67,"context_line":"  DATE\u003d$(date +\"%m_%d_%Y_%H_%M_%S\")"},{"line_number":68,"context_line":"  CURRENT_DIR\u003d`pwd`"},{"line_number":69,"context_line":"  cd $BACKUPS_DIR"},{"line_number":70,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"},{"line_number":71,"context_line":"  ARCHIVE_RET\u003d$?"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_c98790d7","line":68,"range":{"start_line":68,"start_character":2,"end_line":68,"end_character":18},"updated":"2019-03-07 09:58:55.000000000","message":"Going to certain directory, doing some stuff, and then returning to previous directory is usually done with `pushd` and `popd` commands.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":65,"context_line":"else"},{"line_number":66,"context_line":"  #Archive the current db files"},{"line_number":67,"context_line":"  DATE\u003d$(date +\"%m_%d_%Y_%H_%M_%S\")"},{"line_number":68,"context_line":"  CURRENT_DIR\u003d`pwd`"},{"line_number":69,"context_line":"  cd $BACKUPS_DIR"},{"line_number":70,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"},{"line_number":71,"context_line":"  ARCHIVE_RET\u003d$?"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_5451f035","line":68,"range":{"start_line":68,"start_character":2,"end_line":68,"end_character":18},"in_reply_to":"5fc1f717_c98790d7","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"for db in \"${DBNAME[@]}\""},{"line_number":76,"context_line":"do"},{"line_number":77,"context_line":"  #retrieve_grants $db \u003e $BACKUPS_DIR/${db}_grant.sql"},{"line_number":78,"context_line":"  mysql --silent --skip-column-names -e \"show grants for $db;\" 2\u003egrant_err.log \u003e $BACKUPS_DIR/${db}_grant.sql"},{"line_number":79,"context_line":"  if [ \"$?\" -eq 0 ]"},{"line_number":80,"context_line":"  then"},{"line_number":81,"context_line":"    sed -i \u0027s/$/;/\u0027 $BACKUPS_DIR/${db}_grant.sql"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_89d748c0","line":78,"range":{"start_line":78,"start_character":63,"end_line":78,"end_character":78},"updated":"2019-03-07 09:58:55.000000000","message":"Wouldn\u0027t you want to retain full log with results of showing grants for all databases?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  then"},{"line_number":81,"context_line":"    sed -i \u0027s/$/;/\u0027 $BACKUPS_DIR/${db}_grant.sql"},{"line_number":82,"context_line":"  else"},{"line_number":83,"context_line":"    cat grant_err.log"},{"line_number":84,"context_line":"  fi"},{"line_number":85,"context_line":"done"},{"line_number":86,"context_line":"#Remove the current backup"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_8900a836","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":21},"updated":"2019-03-07 09:58:55.000000000","message":"Should we `exit 1` if we fail to dump grants?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  then"},{"line_number":81,"context_line":"    sed -i \u0027s/$/;/\u0027 $BACKUPS_DIR/${db}_grant.sql"},{"line_number":82,"context_line":"  else"},{"line_number":83,"context_line":"    cat grant_err.log"},{"line_number":84,"context_line":"  fi"},{"line_number":85,"context_line":"done"},{"line_number":86,"context_line":"#Remove the current backup"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_341a247d","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":21},"in_reply_to":"5fc1f717_8900a836","updated":"2019-03-11 00:14:28.000000000","message":"Well, grant can be restore easily for openstack databases in case we don\u0027t have it. Reason why I did not exit.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"},{"line_number":95,"context_line":"    then"},{"line_number":96,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":97,"context_line":"      find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":98,"context_line":"    fi"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":"#Remove the credential file after completion"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_49a8801e","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":62},"updated":"2019-03-07 09:58:55.000000000","message":"First list what would we delete here, and then delete.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"},{"line_number":95,"context_line":"    then"},{"line_number":96,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":97,"context_line":"      find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":98,"context_line":"    fi"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":"#Remove the credential file after completion"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_2b287e84","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":62},"in_reply_to":"5fc1f717_49a8801e","updated":"2019-03-11 00:14:28.000000000","message":"This should print the file that will be remove. Unless you want me to do it in 2 separate call.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    fi"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":"#Remove the credential file after completion"},{"line_number":101,"context_line":"echo \"Deleting the credential file\""},{"line_number":102,"context_line":"rm -rf ~/.my.cnf"},{"line_number":103,"context_line":"echo 0"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a96c8408","line":101,"range":{"start_line":101,"start_character":19,"end_line":101,"end_character":29},"updated":"2019-03-07 09:58:55.000000000","message":"credentials","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    fi"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":"#Remove the credential file after completion"},{"line_number":101,"context_line":"echo \"Deleting the credential file\""},{"line_number":102,"context_line":"rm -rf ~/.my.cnf"},{"line_number":103,"context_line":"echo 0"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_0827c8b5","line":101,"range":{"start_line":101,"start_character":19,"end_line":101,"end_character":29},"in_reply_to":"5fc1f717_a96c8408","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"#Remove the credential file after completion"},{"line_number":101,"context_line":"echo \"Deleting the credential file\""},{"line_number":102,"context_line":"rm -rf ~/.my.cnf"},{"line_number":103,"context_line":"echo 0"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_c971d0e2","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":6},"updated":"2019-03-07 09:58:55.000000000","message":"Why is this needed?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":100,"context_line":"#Remove the credential file after completion"},{"line_number":101,"context_line":"echo \"Deleting the credential file\""},{"line_number":102,"context_line":"rm -rf ~/.my.cnf"},{"line_number":103,"context_line":"echo 0"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a83b14cf","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":6},"in_reply_to":"5fc1f717_c971d0e2","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":34,"context_line":"password\u003d$DBPASSWD"},{"line_number":35,"context_line":"host\u003d$DBHOST"},{"line_number":36,"context_line":"EOF"},{"line_number":37,"context_line":"chmod 600 ~/.my.cnf"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_73098a93","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":19},"updated":"2019-03-08 17:19:30.000000000","message":"Usually it is done by setting proper `umask` setting before creation of the file. Not by changing  mode after you have created the file.","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":34,"context_line":"password\u003d$DBPASSWD"},{"line_number":35,"context_line":"host\u003d$DBHOST"},{"line_number":36,"context_line":"EOF"},{"line_number":37,"context_line":"chmod 600 ~/.my.cnf"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_3238ca9e","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":19},"in_reply_to":"5fc1f717_73098a93","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  echo $check"},{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DBNAME\u003d( `echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027`)"},{"line_number":52,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":53,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":54,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_9359965b","line":51,"range":{"start_line":51,"start_character":9,"end_line":51,"end_character":112},"updated":"2019-03-08 17:19:30.000000000","message":"`xxx` back ticks are outdated; try to use $(xxx) format","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  echo $check"},{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DBNAME\u003d( `echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027`)"},{"line_number":52,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":53,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":54,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_523b169b","line":51,"range":{"start_line":51,"start_character":9,"end_line":51,"end_character":112},"in_reply_to":"5fc1f717_9359965b","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DBNAME\u003d( `echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027`)"},{"line_number":52,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":53,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":54,"context_line":"then"},{"line_number":55,"context_line":"  echo \"There is no database to backup\""}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_d33e3e28","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":55},"updated":"2019-03-08 17:19:30.000000000","message":"Swap with the line above.","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":49,"context_line":"}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"DBNAME\u003d( `echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027`)"},{"line_number":52,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":53,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":54,"context_line":"then"},{"line_number":55,"context_line":"  echo \"There is no database to backup\""}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_b26d9a33","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":55},"in_reply_to":"5fc1f717_d33e3e28","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  exit 1"},{"line_number":57,"context_line":"fi"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#Create archive and backup directory if it does not exist."},{"line_number":60,"context_line":"mkdir -p $BACKUPS_DIR $ARCHIVE_DIR"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"DATE\u003d$(date +\"%Y_%m_%d_%H_%M_%S\")"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_d3271e12","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":58},"updated":"2019-03-08 17:19:30.000000000","message":"#Create archive and backup directories","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  exit 1"},{"line_number":57,"context_line":"fi"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#Create archive and backup directory if it does not exist."},{"line_number":60,"context_line":"mkdir -p $BACKUPS_DIR $ARCHIVE_DIR"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"DATE\u003d$(date +\"%Y_%m_%d_%H_%M_%S\")"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_f241e20c","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":58},"in_reply_to":"5fc1f717_d3271e12","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":59,"context_line":"#Create archive and backup directory if it does not exist."},{"line_number":60,"context_line":"mkdir -p $BACKUPS_DIR $ARCHIVE_DIR"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"DATE\u003d$(date +\"%Y_%m_%d_%H_%M_%S\")"},{"line_number":63,"context_line":"#Dumping the database"},{"line_number":64,"context_line":"mysqldump $MYSQLDUMP_OPTIONS --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \\"},{"line_number":65,"context_line":"          \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_f3ac9a36","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":33},"updated":"2019-03-08 17:19:30.000000000","message":"move to the line 64 (just before the backup start)","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"DATE\u003d$(date +\"%Y_%m_%d_%H_%M_%S\")"},{"line_number":63,"context_line":"#Dumping the database"},{"line_number":64,"context_line":"mysqldump $MYSQLDUMP_OPTIONS --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \\"},{"line_number":65,"context_line":"          \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":66,"context_line":"if [ $(check_dump_success \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":67,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_7398aa1a","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":77},"updated":"2019-03-08 17:19:30.000000000","message":"include this into MYSQLDUMP_OPTIONS variable by default on line 25, and leave possibility for a user to supply his own MYSQLDUMP_OPTIONS variable.","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"DATE\u003d$(date +\"%Y_%m_%d_%H_%M_%S\")"},{"line_number":63,"context_line":"#Dumping the database"},{"line_number":64,"context_line":"mysqldump $MYSQLDUMP_OPTIONS --add-drop-database --add-drop-table --databases \"${DBNAME[@]}\"  \\"},{"line_number":65,"context_line":"          \u003e $BACKUPS_DIR/mariadb-all.sql 2\u003edberror.log"},{"line_number":66,"context_line":"if [ $(check_dump_success \"$?\" \"$BACKUPS_DIR/mariadb-all.sql\") -ne 0 ]"},{"line_number":67,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_72773204","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":77},"in_reply_to":"5fc1f717_7398aa1a","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":71,"context_line":"  exit 1"},{"line_number":72,"context_line":"else"},{"line_number":73,"context_line":"  #Archive the current db files"},{"line_number":74,"context_line":"  cd $BACKUPS_DIR"},{"line_number":75,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"},{"line_number":76,"context_line":"  ARCHIVE_RET\u003d$?"},{"line_number":77,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_13d126ce","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":17},"updated":"2019-03-08 17:19:30.000000000","message":"pushd/podp","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"359de3083a205f7fe012aec9d24595dcecf3f636","unresolved":false,"context_lines":[{"line_number":71,"context_line":"  exit 1"},{"line_number":72,"context_line":"else"},{"line_number":73,"context_line":"  #Archive the current db files"},{"line_number":74,"context_line":"  cd $BACKUPS_DIR"},{"line_number":75,"context_line":"  tar zcvf $ARCHIVE_DIR/mariadb-all-${DATE}.tar.gz *"},{"line_number":76,"context_line":"  ARCHIVE_RET\u003d$?"},{"line_number":77,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_d2686622","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":17},"in_reply_to":"5fc1f717_13d126ce","updated":"2019-03-11 00:14:28.000000000","message":"Done","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"#Remove the credentials file after completion"},{"line_number":109,"context_line":"echo \"Deleting the credentials file\""},{"line_number":110,"context_line":"if [ -f ~/.my.cnf ]"},{"line_number":111,"context_line":"then"},{"line_number":112,"context_line":"  rm -rf ~/.my.cnf"},{"line_number":113,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_33b542ce","line":110,"range":{"start_line":110,"start_character":0,"end_line":110,"end_character":19},"updated":"2019-03-08 17:19:30.000000000","message":"Just delete the file, without any checks. It will not fail anyway (unless FS is R/O or something like that...).","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"e14cf71e8c2f10a1dac4999a59043ee9434e833d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"},{"line_number":41,"context_line":"  dumpfile\u003d$2"},{"line_number":42,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_a099ad6e","line":39,"updated":"2019-03-11 21:44:54.000000000","message":"How about that its non-zero in size?","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"01ac112566d596c0c9b86ab0dc48758a58f6cd35","unresolved":false,"context_lines":[{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"},{"line_number":41,"context_line":"  dumpfile\u003d$2"},{"line_number":42,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_bef1936d","line":39,"in_reply_to":"5fc1f717_a099ad6e","updated":"2019-03-14 11:03:58.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"cc5a4002b3493bb76f8625b732c3b8eb03397440","unresolved":false,"context_lines":[{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"},{"line_number":41,"context_line":"  dumpfile\u003d$2"},{"line_number":42,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_f832cef1","line":39,"in_reply_to":"5fc1f717_bef1936d","updated":"2019-03-14 13:11:24.000000000","message":"Done - Where?","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"da6a39e27725cdd3030b1b330495bf03964a0b8f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"},{"line_number":40,"context_line":"  ret\u003d$1"},{"line_number":41,"context_line":"  dumpfile\u003d$2"},{"line_number":42,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_07c09329","line":39,"in_reply_to":"5fc1f717_bef1936d","updated":"2019-03-14 16:06:33.000000000","message":"We can only check for a non 0 byte file. If it is 0 byte file it will return 1 and we will exit with a non zero and log line 81","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"e14cf71e8c2f10a1dac4999a59043ee9434e833d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"#Remove the current backup"},{"line_number":96,"context_line":"if [ -d $BACKUPS_DIR ]"},{"line_number":97,"context_line":"then"},{"line_number":98,"context_line":"  rm -rf $BACKUPS_DIR/*"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"#Only delete the old archive after a successful archive"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_80791130","line":98,"updated":"2019-03-11 21:44:54.000000000","message":"I don\u0027t like this.","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"01ac112566d596c0c9b86ab0dc48758a58f6cd35","unresolved":false,"context_lines":[{"line_number":95,"context_line":"#Remove the current backup"},{"line_number":96,"context_line":"if [ -d $BACKUPS_DIR ]"},{"line_number":97,"context_line":"then"},{"line_number":98,"context_line":"  rm -rf $BACKUPS_DIR/*"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"#Only delete the old archive after a successful archive"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_def6df63","line":98,"in_reply_to":"5fc1f717_80791130","updated":"2019-03-14 11:03:58.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"e14cf71e8c2f10a1dac4999a59043ee9434e833d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"  rm -rf $BACKUPS_DIR/*"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"#Only delete the old archive after a successful archive"},{"line_number":102,"context_line":"if [ $ARCHIVE_RET -eq 0 ]"},{"line_number":103,"context_line":"  then"},{"line_number":104,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_c087190f","line":101,"updated":"2019-03-11 21:44:54.000000000","message":"I\u0027m not sure how this will work as a cron job executing randomly over 4 different nodes.  Can this not be stored in RGW/S3/...?","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"01ac112566d596c0c9b86ab0dc48758a58f6cd35","unresolved":false,"context_lines":[{"line_number":98,"context_line":"  rm -rf $BACKUPS_DIR/*"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"#Only delete the old archive after a successful archive"},{"line_number":102,"context_line":"if [ $ARCHIVE_RET -eq 0 ]"},{"line_number":103,"context_line":"  then"},{"line_number":104,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_9eecd78f","line":101,"in_reply_to":"5fc1f717_c087190f","updated":"2019-03-14 11:03:58.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"  rm -rf $BACKUPS_DIR/*"},{"line_number":99,"context_line":"fi"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"#Only delete the old archive after a successful archive"},{"line_number":102,"context_line":"if [ $ARCHIVE_RET -eq 0 ]"},{"line_number":103,"context_line":"  then"},{"line_number":104,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_4ada3b4b","line":101,"in_reply_to":"5fc1f717_c087190f","updated":"2019-03-13 15:44:51.000000000","message":"I move it to PVC for now instead as RGW will have depend on keystone and will make it hard to restore keystone in case.","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":7769,"name":"Pentheus","display_name":"Alan Meadows","email":"alan.meadows@gmail.com","username":"alanmeadows"},"change_message_id":"e14cf71e8c2f10a1dac4999a59043ee9434e833d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"},{"line_number":105,"context_line":"    then"},{"line_number":106,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":107,"context_line":"      find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":108,"context_line":"    fi"},{"line_number":109,"context_line":"fi"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_607e651a","line":107,"updated":"2019-03-11 21:44:54.000000000","message":"I don\u0027t like this.","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"01ac112566d596c0c9b86ab0dc48758a58f6cd35","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    if [ \"$DAYS_TO_KEEP\" -gt 0 ]"},{"line_number":105,"context_line":"    then"},{"line_number":106,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":107,"context_line":"      find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":108,"context_line":"    fi"},{"line_number":109,"context_line":"fi"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":9,"id":"5fc1f717_3e05a346","line":107,"in_reply_to":"5fc1f717_607e651a","updated":"2019-03-14 11:03:58.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"f41177fff6577fe2ad12549e783e1e175aede7b5","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"#database info"},{"line_number":19,"context_line":"DBHOST\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":20,"context_line":"DBUSER\u003d$MARIADB_BACKUP_USER"},{"line_number":21,"context_line":"DBPASSWD\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_425e8944","line":22,"range":{"start_line":19,"start_character":0,"end_line":22,"end_character":25},"updated":"2019-03-14 16:30:54.000000000","message":"why not just use the vars, rather than re-assigning them?","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"89b8847c3161e828934e40b3012122fce1261732","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"#database info"},{"line_number":19,"context_line":"DBHOST\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":20,"context_line":"DBUSER\u003d$MARIADB_BACKUP_USER"},{"line_number":21,"context_line":"DBPASSWD\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_b55d2848","line":22,"range":{"start_line":19,"start_character":0,"end_line":22,"end_character":25},"in_reply_to":"5fc1f717_425e8944","updated":"2019-03-14 18:09:12.000000000","message":"I did is this for readeability and also the original script has those in it so it just easy if I don\u0027t have to chase down the vars. But it that is an issue I can change it.","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"f41177fff6577fe2ad12549e783e1e175aede7b5","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DBUSER\u003d$MARIADB_BACKUP_USER"},{"line_number":21,"context_line":"DBPASSWD\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"},{"line_number":26,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE_DIR"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_c237d9fe","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":6},"updated":"2019-03-14 16:30:54.000000000","message":"can we set \u0027e\u0027 as well here, and ensure the script is robust enough to cope with this.","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"89b8847c3161e828934e40b3012122fce1261732","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DBUSER\u003d$MARIADB_BACKUP_USER"},{"line_number":21,"context_line":"DBPASSWD\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"},{"line_number":26,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE_DIR"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_d539d4f1","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":6},"in_reply_to":"5fc1f717_c237d9fe","updated":"2019-03-14 18:09:12.000000000","message":"I need to catch some error from mysql and mysqldump command and log it and if I set [ -e ] it will exit before I can capture it.","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"f41177fff6577fe2ad12549e783e1e175aede7b5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"DBPASSWD\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":22,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":23,"context_line":"set -x"},{"line_number":24,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":25,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"},{"line_number":26,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE_DIR"},{"line_number":27,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":28,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_4223e9bd","line":26,"range":{"start_line":24,"start_character":0,"end_line":26,"end_character":33},"updated":"2019-03-14 16:30:54.000000000","message":"again - why re-assign the vars here?","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"f41177fff6577fe2ad12549e783e1e175aede7b5","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"umask 066"},{"line_number":31,"context_line":"#Creating credentials file to hide credentials from command line"},{"line_number":32,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":33,"context_line":"[client]"},{"line_number":34,"context_line":"user\u003d$DBUSER"},{"line_number":35,"context_line":"password\u003d$DBPASSWD"},{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_8248f186","line":36,"range":{"start_line":32,"start_character":0,"end_line":36,"end_character":12},"updated":"2019-03-14 16:30:54.000000000","message":"why not do this via a configmap mounted in?","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"89b8847c3161e828934e40b3012122fce1261732","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"umask 066"},{"line_number":31,"context_line":"#Creating credentials file to hide credentials from command line"},{"line_number":32,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":33,"context_line":"[client]"},{"line_number":34,"context_line":"user\u003d$DBUSER"},{"line_number":35,"context_line":"password\u003d$DBPASSWD"},{"line_number":36,"context_line":"host\u003d$DBHOST"},{"line_number":37,"context_line":"EOF"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"check_dump_success() {"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_d5123462","line":36,"range":{"start_line":32,"start_character":0,"end_line":36,"end_character":12},"in_reply_to":"5fc1f717_8248f186","updated":"2019-03-14 18:09:12.000000000","message":"I will do it with configmap","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"cc5a4002b3493bb76f8625b732c3b8eb03397440","unresolved":false,"context_lines":[{"line_number":65,"context_line":"#Retrieve and create the GRANT files per DB"},{"line_number":66,"context_line":"for db in \"${DBNAME[@]}\""},{"line_number":67,"context_line":"do"},{"line_number":68,"context_line":"  mysql --silent --skip-column-names -e \"show grants for $db;\" 2\u003egrant_err.log \u003e $BACKUPS_DIR/${db}_grant.sql"},{"line_number":69,"context_line":"  if [ \"$?\" -eq 0 ]"},{"line_number":70,"context_line":"  then"},{"line_number":71,"context_line":"    sed -i \u0027s/$/;/\u0027 $BACKUPS_DIR/${db}_grant.sql"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_b890c644","line":68,"range":{"start_line":68,"start_character":41,"end_line":68,"end_character":61},"updated":"2019-03-14 13:11:24.000000000","message":"This doesn\u0027t work for me. Syntax requires here to have `user`, and not a `database`. What could be wrong here?\nhttp://paste.openstack.org/show/747773/","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"da6a39e27725cdd3030b1b330495bf03964a0b8f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"#Retrieve and create the GRANT files per DB"},{"line_number":66,"context_line":"for db in \"${DBNAME[@]}\""},{"line_number":67,"context_line":"do"},{"line_number":68,"context_line":"  mysql --silent --skip-column-names -e \"show grants for $db;\" 2\u003egrant_err.log \u003e $BACKUPS_DIR/${db}_grant.sql"},{"line_number":69,"context_line":"  if [ \"$?\" -eq 0 ]"},{"line_number":70,"context_line":"  then"},{"line_number":71,"context_line":"    sed -i \u0027s/$/;/\u0027 $BACKUPS_DIR/${db}_grant.sql"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_67fdd76c","line":68,"range":{"start_line":68,"start_character":41,"end_line":68,"end_character":61},"in_reply_to":"5fc1f717_b890c644","updated":"2019-03-14 16:06:33.000000000","message":"Done","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"cc5a4002b3493bb76f8625b732c3b8eb03397440","unresolved":false,"context_lines":[{"line_number":106,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":107,"context_line":"      if [ -d $ARCHIVE_DIR ]"},{"line_number":108,"context_line":"      then"},{"line_number":109,"context_line":"        find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":110,"context_line":"      fi"},{"line_number":111,"context_line":"    fi"},{"line_number":112,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_3814d643","line":109,"range":{"start_line":109,"start_character":56,"end_line":109,"end_character":64},"updated":"2019-03-14 13:11:24.000000000","message":"Use `-delete` option, or add `-f` to `rm`.","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"f41177fff6577fe2ad12549e783e1e175aede7b5","unresolved":false,"context_lines":[{"line_number":106,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":107,"context_line":"      if [ -d $ARCHIVE_DIR ]"},{"line_number":108,"context_line":"      then"},{"line_number":109,"context_line":"        find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":110,"context_line":"      fi"},{"line_number":111,"context_line":"    fi"},{"line_number":112,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_9d005403","line":109,"range":{"start_line":109,"start_character":8,"end_line":109,"end_character":64},"updated":"2019-03-14 16:30:54.000000000","message":"this is fragile, can we not use the filename to do this?","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"da6a39e27725cdd3030b1b330495bf03964a0b8f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":107,"context_line":"      if [ -d $ARCHIVE_DIR ]"},{"line_number":108,"context_line":"      then"},{"line_number":109,"context_line":"        find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":110,"context_line":"      fi"},{"line_number":111,"context_line":"    fi"},{"line_number":112,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_8702436e","line":109,"range":{"start_line":109,"start_character":56,"end_line":109,"end_character":64},"in_reply_to":"5fc1f717_3814d643","updated":"2019-03-14 16:06:33.000000000","message":"Done","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"d90e7904fd0a1cad6ab7371139857f904f060149","unresolved":false,"context_lines":[{"line_number":61,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":62,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":63,"context_line":"then"},{"line_number":64,"context_line":"  echo \"There is no database to backup\""},{"line_number":65,"context_line":"  exit 1"},{"line_number":66,"context_line":"fi"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"#Create archive and backup directories."}],"source_content_type":"text/x-smarty","patch_set":16,"id":"5fc1f717_7d01d137","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":8},"updated":"2019-03-15 16:44:47.000000000","message":"Are we sure we want to exit 1 if there\u0027s no database to backup?  If this job happens to trigger before any databases have been created, it\u0027s just going to result in a crashloop","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"85f70e4e4c732e470a0c5b97b7867ac271b2c64e","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"#database info"},{"line_number":19,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":20,"context_line":"set -x"},{"line_number":21,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":22,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"},{"line_number":23,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE_DIR"},{"line_number":24,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":25,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_93a6cdc0","line":23,"range":{"start_line":19,"start_character":0,"end_line":23,"end_character":33},"updated":"2019-03-18 17:57:50.000000000","message":"no need to re-assign","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"08d7aa2e841f3cafba0b3af635a6a23cba3b9c7f","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"#database info"},{"line_number":19,"context_line":"NS\u003d$MARIADB_POD_NAMESPACE"},{"line_number":20,"context_line":"set -x"},{"line_number":21,"context_line":"DAYS_TO_KEEP\u003d$MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":22,"context_line":"MYSQLDUMP_OPTIONS\u003d$MYSQL_BACKUP_MYSQLDUMP_OPTIONS"},{"line_number":23,"context_line":"BASE_DIR\u003d$MARIADB_BACKUP_BASE_DIR"},{"line_number":24,"context_line":"BACKUPS_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/current"},{"line_number":25,"context_line":"ARCHIVE_DIR\u003d${BASE_DIR}/db/${NS}/mariadb/archive"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_e678adc4","line":23,"range":{"start_line":19,"start_character":0,"end_line":23,"end_character":33},"in_reply_to":"5fc1f717_93a6cdc0","updated":"2019-03-19 19:38:33.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"85f70e4e4c732e470a0c5b97b7867ac271b2c64e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"umask 066"},{"line_number":28,"context_line":"#Creating credentials file to hide credentials from command line"},{"line_number":29,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":30,"context_line":"[client]"},{"line_number":31,"context_line":"user\u003d$MARIADB_BACKUP_USER"},{"line_number":32,"context_line":"password\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":33,"context_line":"host\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":34,"context_line":"EOF"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"check_dump_success() {"},{"line_number":37,"context_line":"  ret\u003d$1"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_b39c296a","line":34,"range":{"start_line":29,"start_character":0,"end_line":34,"end_character":3},"updated":"2019-03-18 17:57:50.000000000","message":"see ps13 comment","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"08d7aa2e841f3cafba0b3af635a6a23cba3b9c7f","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"umask 066"},{"line_number":28,"context_line":"#Creating credentials file to hide credentials from command line"},{"line_number":29,"context_line":"cat \u003c\u003cEOF \u003e~/.my.cnf"},{"line_number":30,"context_line":"[client]"},{"line_number":31,"context_line":"user\u003d$MARIADB_BACKUP_USER"},{"line_number":32,"context_line":"password\u003d$MARIADB_BACKUP_PASSWORD"},{"line_number":33,"context_line":"host\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":34,"context_line":"EOF"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"check_dump_success() {"},{"line_number":37,"context_line":"  ret\u003d$1"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_b002c008","line":34,"range":{"start_line":29,"start_character":0,"end_line":34,"end_character":3},"in_reply_to":"5fc1f717_b39c296a","updated":"2019-03-19 19:38:33.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"85f70e4e4c732e470a0c5b97b7867ac271b2c64e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"host\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":34,"context_line":"EOF"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"check_dump_success() {"},{"line_number":37,"context_line":"  ret\u003d$1"},{"line_number":38,"context_line":"  dumpfile\u003d$2"},{"line_number":39,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"},{"line_number":40,"context_line":"  then"},{"line_number":41,"context_line":"    check\u003d0"},{"line_number":42,"context_line":"  else"},{"line_number":43,"context_line":"    check\u003d1"},{"line_number":44,"context_line":"  fi"},{"line_number":45,"context_line":"  echo $check"},{"line_number":46,"context_line":"}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"delete_files() {"},{"line_number":49,"context_line":"  files_to_delete\u003d(\"$@\")"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_732d61fc","line":46,"range":{"start_line":36,"start_character":0,"end_line":46,"end_character":1},"updated":"2019-03-18 17:57:50.000000000","message":"this seems rather complex, considering its called once - can we use the same logic directly on line 91","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"08d7aa2e841f3cafba0b3af635a6a23cba3b9c7f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"host\u003d$MARIADB_SERVER_SERVICE_HOST"},{"line_number":34,"context_line":"EOF"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"check_dump_success() {"},{"line_number":37,"context_line":"  ret\u003d$1"},{"line_number":38,"context_line":"  dumpfile\u003d$2"},{"line_number":39,"context_line":"  if [[ \"$ret\" -eq 0 \u0026\u0026 -s \"$dumpfile\" ]]"},{"line_number":40,"context_line":"  then"},{"line_number":41,"context_line":"    check\u003d0"},{"line_number":42,"context_line":"  else"},{"line_number":43,"context_line":"    check\u003d1"},{"line_number":44,"context_line":"  fi"},{"line_number":45,"context_line":"  echo $check"},{"line_number":46,"context_line":"}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"delete_files() {"},{"line_number":49,"context_line":"  files_to_delete\u003d(\"$@\")"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_c679f1c4","line":46,"range":{"start_line":36,"start_character":0,"end_line":46,"end_character":1},"in_reply_to":"5fc1f717_732d61fc","updated":"2019-03-19 19:38:33.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"85f70e4e4c732e470a0c5b97b7867ac271b2c64e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  done"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"DBNAME\u003d( $(echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027))"},{"line_number":61,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":62,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":63,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_b3750934","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":113},"updated":"2019-03-18 17:57:50.000000000","message":"can we clean this up please","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"08d7aa2e841f3cafba0b3af635a6a23cba3b9c7f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"  done"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"DBNAME\u003d( $(echo \"show databases\" |  mysql  | tail -n+2 | egrep -vi \u0027information_schema|performance_schema|mysql\u0027))"},{"line_number":61,"context_line":"#check if there is a database to backup, otherwise exit"},{"line_number":62,"context_line":"if [[ -z \"${DBNAME// }\" ]]"},{"line_number":63,"context_line":"then"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"5fc1f717_5007dc19","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":113},"in_reply_to":"5fc1f717_b3750934","updated":"2019-03-19 19:38:33.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"}],"mariadb/templates/bin/_restore_mariadb.sh.tpl":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"89553c3babbef24f6e14a964ddae0ecac95271ed","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"BACKUPS_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/current"},{"line_number":18,"context_line":"ARCHIVE_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/archive"},{"line_number":19,"context_line":"RESTORE_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/restore"},{"line_number":20,"context_line":"ARGS\u003d(\"$@\")"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"5fc1f717_b8770209","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":82},"updated":"2019-03-20 13:41:52.000000000","message":"is this used anywhere?","commit_id":"bd3392606d8f81ece0ca1e769bd8c5ad673af8d8"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"3a076e25e4e99764df87d74cbbc755bc4ec104e8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"BACKUPS_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/current"},{"line_number":18,"context_line":"ARCHIVE_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/archive"},{"line_number":19,"context_line":"RESTORE_DIR\u003d${MARIADB_BACKUP_BASE_DIR}/db/${MARIADB_POD_NAMESPACE}/mariadb/restore"},{"line_number":20,"context_line":"ARGS\u003d(\"$@\")"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"5fc1f717_1a9160f2","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":82},"in_reply_to":"5fc1f717_b8770209","updated":"2019-03-20 13:45:35.000000000","message":"This will be removed. It is not used in the restore. I just copy the var from the backup.","commit_id":"bd3392606d8f81ece0ca1e769bd8c5ad673af8d8"}],"mariadb/templates/cron-job-backup-mariadb.yaml":[{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                  name: mariadb-dbadmin-password"},{"line_number":57,"context_line":"            - name: MARIADB_BACKUP_USER"},{"line_number":58,"context_line":"              value: root"},{"line_number":59,"context_line":"            - name: MARIADB_BACKUP_BASE"},{"line_number":60,"context_line":"              value: {{ .Values.conf.backup.base_path }}"},{"line_number":61,"context_line":"            - name: MARIADB_BACKUP_DAYS_TO_KEEP"},{"line_number":62,"context_line":"              value: \"{{ .Values.conf.backup.days_of_backup_to_keep }}\""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5fc1f717_a9456472","line":59,"range":{"start_line":59,"start_character":20,"end_line":59,"end_character":39},"updated":"2019-03-07 09:58:55.000000000","message":"Variable name is not clear.","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"db0cf5d51f2ec26d3c93ec862941bd5c4e82239d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"          serviceAccountName: {{ $serviceAccountName }}"},{"line_number":81,"context_line":"          volumes:"},{"line_number":82,"context_line":"          - configMap:"},{"line_number":83,"context_line":"              defaultMode: 365"},{"line_number":84,"context_line":"              name: mariadb-bin"},{"line_number":85,"context_line":"            name: mariadb-bin"},{"line_number":86,"context_line":"          - hostPath:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5fc1f717_a4082b28","line":83,"range":{"start_line":83,"start_character":14,"end_line":83,"end_character":30},"updated":"2019-03-07 09:58:55.000000000","message":"Is that the right mode?","commit_id":"5e0d658aab7277c3cf634a3d054f2a72a5d1b99e"},{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":82,"context_line":"          serviceAccountName: {{ $serviceAccountName }}"},{"line_number":83,"context_line":"          volumes:"},{"line_number":84,"context_line":"          - configMap:"},{"line_number":85,"context_line":"              defaultMode: 365"},{"line_number":86,"context_line":"              name: mariadb-bin"},{"line_number":87,"context_line":"            name: mariadb-bin"},{"line_number":88,"context_line":"          - hostPath:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5fc1f717_73342afc","line":85,"range":{"start_line":85,"start_character":14,"end_line":85,"end_character":30},"updated":"2019-03-08 17:19:30.000000000","message":"Is that the right mode?","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"67bd5470955b069692c42885bd13e24a77fa2497","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                  key: MYSQL_DBADMIN_PASSWORD"},{"line_number":56,"context_line":"                  name: mariadb-dbadmin-password"},{"line_number":57,"context_line":"            - name: MARIADB_BACKUP_USER"},{"line_number":58,"context_line":"              value: root"},{"line_number":59,"context_line":"            - name: MARIADB_BACKUP_BASE_DIR"},{"line_number":60,"context_line":"              value: {{ .Values.conf.backup.base_path }}"},{"line_number":61,"context_line":"            - name: MYSQL_BACKUP_MYSQLDUMP_OPTIONS"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_8b3cd7bf","line":58,"range":{"start_line":58,"start_character":21,"end_line":58,"end_character":25},"updated":"2019-03-11 17:49:30.000000000","message":"This needs to get assigned via values.yaml","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                  key: MYSQL_DBADMIN_PASSWORD"},{"line_number":56,"context_line":"                  name: mariadb-dbadmin-password"},{"line_number":57,"context_line":"            - name: MARIADB_BACKUP_USER"},{"line_number":58,"context_line":"              value: root"},{"line_number":59,"context_line":"            - name: MARIADB_BACKUP_BASE_DIR"},{"line_number":60,"context_line":"              value: {{ .Values.conf.backup.base_path }}"},{"line_number":61,"context_line":"            - name: MYSQL_BACKUP_MYSQLDUMP_OPTIONS"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_7125dec1","line":58,"range":{"start_line":58,"start_character":21,"end_line":58,"end_character":25},"in_reply_to":"5fc1f717_8b3cd7bf","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"67bd5470955b069692c42885bd13e24a77fa2497","unresolved":false,"context_lines":[{"line_number":69,"context_line":"{{ tuple $envAll \"mariadb_backup\" | include \"helm-toolkit.snippets.image\" | indent 12 }}"},{"line_number":70,"context_line":"{{ tuple $envAll $envAll.Values.pod.resources.jobs.mariadb_backup | include \"helm-toolkit.snippets.kubernetes_resources\" | indent 12 }}"},{"line_number":71,"context_line":"            name: mariadb-backup"},{"line_number":72,"context_line":"            resources: {}"},{"line_number":73,"context_line":"            volumeMounts:"},{"line_number":74,"context_line":"            - mountPath: /tmp/backup_mariadb.sh"},{"line_number":75,"context_line":"              name: mariadb-bin"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_eb76bba4","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":25},"updated":"2019-03-11 17:49:30.000000000","message":"needs removed","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"{{ tuple $envAll \"mariadb_backup\" | include \"helm-toolkit.snippets.image\" | indent 12 }}"},{"line_number":70,"context_line":"{{ tuple $envAll $envAll.Values.pod.resources.jobs.mariadb_backup | include \"helm-toolkit.snippets.kubernetes_resources\" | indent 12 }}"},{"line_number":71,"context_line":"            name: mariadb-backup"},{"line_number":72,"context_line":"            resources: {}"},{"line_number":73,"context_line":"            volumeMounts:"},{"line_number":74,"context_line":"            - mountPath: /tmp/backup_mariadb.sh"},{"line_number":75,"context_line":"              name: mariadb-bin"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_91208ab2","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":25},"in_reply_to":"5fc1f717_eb76bba4","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"d3d1aedbdfa59815142df04b31bae9b285aef51e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"              defaultMode: 365"},{"line_number":86,"context_line":"              name: mariadb-bin"},{"line_number":87,"context_line":"            name: mariadb-bin"},{"line_number":88,"context_line":"          - hostPath:"},{"line_number":89,"context_line":"              path: {{ .Values.conf.backup.volume_path }}"},{"line_number":90,"context_line":"              type: DirectoryOrCreate"},{"line_number":91,"context_line":"            name: backupdir"},{"line_number":92,"context_line":"{{- end }}"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_4cfe05af","line":91,"range":{"start_line":88,"start_character":0,"end_line":91,"end_character":27},"updated":"2019-03-11 20:37:11.000000000","message":"why is this not backing up to a pvc, or another form of networked storage - as it stands this job will litter backups around a cluster?","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"              defaultMode: 365"},{"line_number":86,"context_line":"              name: mariadb-bin"},{"line_number":87,"context_line":"            name: mariadb-bin"},{"line_number":88,"context_line":"          - hostPath:"},{"line_number":89,"context_line":"              path: {{ .Values.conf.backup.volume_path }}"},{"line_number":90,"context_line":"              type: DirectoryOrCreate"},{"line_number":91,"context_line":"            name: backupdir"},{"line_number":92,"context_line":"{{- end }}"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_ca6aab7f","line":91,"range":{"start_line":88,"start_character":0,"end_line":91,"end_character":27},"in_reply_to":"5fc1f717_4cfe05af","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"}],"mariadb/templates/mariadb-backup-pvc.yaml":[{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"limitations under the License."},{"line_number":15,"context_line":"*/}}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"{{- if .Values.conf.backup.volume.enabled }}"},{"line_number":18,"context_line":"---"},{"line_number":19,"context_line":"kind: PersistentVolumeClaim"},{"line_number":20,"context_line":"apiVersion: v1"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_fd52a112","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":44},"updated":"2019-03-15 16:19:45.000000000","message":"This needs to be an AND conditional on .Values.conf.backup.volume.enabled and .Values.manifests.pvc_backup","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2828d9873df0c0ea8d768f3d4ccf0ed68dd40310","unresolved":false,"context_lines":[{"line_number":14,"context_line":"limitations under the License."},{"line_number":15,"context_line":"*/}}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"{{- if .Values.conf.backup.volume.enabled }}"},{"line_number":18,"context_line":"---"},{"line_number":19,"context_line":"kind: PersistentVolumeClaim"},{"line_number":20,"context_line":"apiVersion: v1"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_2f7c6a81","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":44},"in_reply_to":"5fc1f717_fd52a112","updated":"2019-03-16 00:46:45.000000000","message":"Done","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"}],"mariadb/values.yaml":[{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"836fcb99056385ea56007793ee0f5fb2abb17896","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    enabled: true"},{"line_number":187,"context_line":"    volume_path: /var/backup"},{"line_number":188,"context_line":"    base_path: /var/tmp/backup"},{"line_number":189,"context_line":"    mysqldump_options: --single-transaction --quick --skip-opt"},{"line_number":190,"context_line":"    days_of_backup_to_keep: 3"},{"line_number":191,"context_line":"    jobs:"},{"line_number":192,"context_line":"      backup_mariadb:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5fc1f717_f31fba6d","line":189,"range":{"start_line":189,"start_character":4,"end_line":189,"end_character":62},"updated":"2019-03-08 17:19:30.000000000","message":"don\u0027t add them here; add defaults to the shell script.","commit_id":"653d1f084199b7b00b68d195e7e848c823e64ac0"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"67bd5470955b069692c42885bd13e24a77fa2497","unresolved":false,"context_lines":[{"line_number":131,"context_line":"          memory: \"1024Mi\""},{"line_number":132,"context_line":"          cpu: \"2000m\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"dependencies:"},{"line_number":135,"context_line":"  dynamic:"},{"line_number":136,"context_line":"    common:"},{"line_number":137,"context_line":"      local_image_registry:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_eb9b1bc6","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":12},"updated":"2019-03-11 17:49:30.000000000","message":"This job needs dependencies defined. I can\u0027t imagine we\u0027d want to try and execute this job if the mariadb endpoint isn\u0027t up and ready","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"          memory: \"1024Mi\""},{"line_number":132,"context_line":"          cpu: \"2000m\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"dependencies:"},{"line_number":135,"context_line":"  dynamic:"},{"line_number":136,"context_line":"    common:"},{"line_number":137,"context_line":"      local_image_registry:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_fab430d3","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":12},"in_reply_to":"5fc1f717_eb9b1bc6","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"67bd5470955b069692c42885bd13e24a77fa2497","unresolved":false,"context_lines":[{"line_number":184,"context_line":"  ingress: null"},{"line_number":185,"context_line":"  backup:"},{"line_number":186,"context_line":"    enabled: true"},{"line_number":187,"context_line":"    volume_path: /var/backup"},{"line_number":188,"context_line":"    base_path: /var/tmp/backup"},{"line_number":189,"context_line":"    mysqldump_options: \u003e"},{"line_number":190,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":191,"context_line":"      --add-drop-database --add-drop-table --databases"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_0b6467b8","line":188,"range":{"start_line":187,"start_character":0,"end_line":188,"end_character":30},"updated":"2019-03-11 17:49:30.000000000","message":"Why do these need to differ? Can\u0027t these be the same name for both the directory in the pod and the hostPath volume?","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"  ingress: null"},{"line_number":185,"context_line":"  backup:"},{"line_number":186,"context_line":"    enabled: true"},{"line_number":187,"context_line":"    volume_path: /var/backup"},{"line_number":188,"context_line":"    base_path: /var/tmp/backup"},{"line_number":189,"context_line":"    mysqldump_options: \u003e"},{"line_number":190,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":191,"context_line":"      --add-drop-database --add-drop-table --databases"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_f131ce0c","line":188,"range":{"start_line":187,"start_character":0,"end_line":188,"end_character":30},"in_reply_to":"5fc1f717_0b6467b8","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"9225be7a5930081a38542293ddebc2dd084a14e9","unresolved":false,"context_lines":[{"line_number":189,"context_line":"  backup:"},{"line_number":190,"context_line":"    enabled: true"},{"line_number":191,"context_line":"    base_path: /var/backup"},{"line_number":192,"context_line":"    volume:"},{"line_number":193,"context_line":"      enabled: true"},{"line_number":194,"context_line":"      class_name: general"},{"line_number":195,"context_line":"      size: 5Gi"},{"line_number":196,"context_line":"    mysqldump_options: \u003e"},{"line_number":197,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":198,"context_line":"      --add-drop-database --add-drop-table --databases"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"5fc1f717_5f1ce476","line":195,"range":{"start_line":192,"start_character":0,"end_line":195,"end_character":15},"updated":"2019-03-18 20:46:19.000000000","message":"this should be combined with the top level volume key - and scoped accordingly (ie: \u0027db\u0027 and \u0027backups\u0027)","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"a02bdb384d31b2395f59c30962244319c2b0d13c","unresolved":false,"context_lines":[{"line_number":189,"context_line":"  backup:"},{"line_number":190,"context_line":"    enabled: true"},{"line_number":191,"context_line":"    base_path: /var/backup"},{"line_number":192,"context_line":"    volume:"},{"line_number":193,"context_line":"      enabled: true"},{"line_number":194,"context_line":"      class_name: general"},{"line_number":195,"context_line":"      size: 5Gi"},{"line_number":196,"context_line":"    mysqldump_options: \u003e"},{"line_number":197,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":198,"context_line":"      --add-drop-database --add-drop-table --databases"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"5fc1f717_e7872b61","line":195,"range":{"start_line":192,"start_character":0,"end_line":195,"end_character":15},"in_reply_to":"5fc1f717_5f1ce476","updated":"2019-03-19 21:14:29.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"9225be7a5930081a38542293ddebc2dd084a14e9","unresolved":false,"context_lines":[{"line_number":197,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":198,"context_line":"      --add-drop-database --add-drop-table --databases"},{"line_number":199,"context_line":"    days_of_backup_to_keep: 3"},{"line_number":200,"context_line":"    jobs:"},{"line_number":201,"context_line":"      backup_mariadb:"},{"line_number":202,"context_line":"        cron: \"0/30 * * * *\""},{"line_number":203,"context_line":"        history:"},{"line_number":204,"context_line":"          success: 3"},{"line_number":205,"context_line":"          failed: 1"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"database:"},{"line_number":208,"context_line":"  config_override: null"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"5fc1f717_7f1f606b","line":205,"range":{"start_line":200,"start_character":0,"end_line":205,"end_character":19},"updated":"2019-03-18 20:46:19.000000000","message":"this should live at the top level.","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"a02bdb384d31b2395f59c30962244319c2b0d13c","unresolved":false,"context_lines":[{"line_number":197,"context_line":"      --single-transaction --quick --skip-opt"},{"line_number":198,"context_line":"      --add-drop-database --add-drop-table --databases"},{"line_number":199,"context_line":"    days_of_backup_to_keep: 3"},{"line_number":200,"context_line":"    jobs:"},{"line_number":201,"context_line":"      backup_mariadb:"},{"line_number":202,"context_line":"        cron: \"0/30 * * * *\""},{"line_number":203,"context_line":"        history:"},{"line_number":204,"context_line":"          success: 3"},{"line_number":205,"context_line":"          failed: 1"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"database:"},{"line_number":208,"context_line":"  config_override: null"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"5fc1f717_877c2773","line":205,"range":{"start_line":200,"start_character":0,"end_line":205,"end_character":19},"in_reply_to":"5fc1f717_7f1f606b","updated":"2019-03-19 21:14:29.000000000","message":"Done","commit_id":"2a57a1991d44bccdfe9ebd0af63b478d61320a57"}],"postgresql/templates/bin/_backup_postgresql.sh.tpl":[{"author":{"_account_id":28208,"name":"Roman Gorshunov","email":"roman.gorshunov@att.com","username":"gorshunovr"},"change_message_id":"cc5a4002b3493bb76f8625b732c3b8eb03397440","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    if [ -d $ARCHIVE_DIR ]"},{"line_number":81,"context_line":"    then"},{"line_number":82,"context_line":"      echo \"Deleting backups older than $DAYS_TO_KEEP days\""},{"line_number":83,"context_line":"      find $ARCHIVE_DIR/* -mtime +$DAYS_TO_KEEP -exec rm {} \\;"},{"line_number":84,"context_line":"    fi"},{"line_number":85,"context_line":"  fi"},{"line_number":86,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5fc1f717_f88e4e77","line":83,"range":{"start_line":83,"start_character":48,"end_line":83,"end_character":57},"updated":"2019-03-14 13:11:24.000000000","message":"`-f` or use `-delete` option.","commit_id":"3ae4f30769c96ba8c1c7484f4b09def9e081aaef"}],"postgresql/templates/cron-job-backup-postgres.yaml":[{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"67bd5470955b069692c42885bd13e24a77fa2497","unresolved":false,"context_lines":[{"line_number":72,"context_line":"{{ tuple $envAll \"postgresql_backup\" | include \"helm-toolkit.snippets.image\" | indent 12 }}"},{"line_number":73,"context_line":"{{ tuple $envAll $envAll.Values.pod.resources.jobs.postgresql_backup | include \"helm-toolkit.snippets.kubernetes_resources\" | indent 12 }}"},{"line_number":74,"context_line":"            name: postgresql-backup"},{"line_number":75,"context_line":"            resources: {}"},{"line_number":76,"context_line":"            volumeMounts:"},{"line_number":77,"context_line":"            - mountPath: /tmp/backup_postgresql.sh"},{"line_number":78,"context_line":"              name: postgresql-bin"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_abcc33bc","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":25},"updated":"2019-03-11 17:49:30.000000000","message":"needs removed","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"},{"author":{"_account_id":28875,"name":"Koffi Nogbe","email":"kn4078@att.com","username":"kn4078"},"change_message_id":"2cce06fb8c85393fd06e9ff14cdbfea4e7b12d6f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"{{ tuple $envAll \"postgresql_backup\" | include \"helm-toolkit.snippets.image\" | indent 12 }}"},{"line_number":73,"context_line":"{{ tuple $envAll $envAll.Values.pod.resources.jobs.postgresql_backup | include \"helm-toolkit.snippets.kubernetes_resources\" | indent 12 }}"},{"line_number":74,"context_line":"            name: postgresql-backup"},{"line_number":75,"context_line":"            resources: {}"},{"line_number":76,"context_line":"            volumeMounts:"},{"line_number":77,"context_line":"            - mountPath: /tmp/backup_postgresql.sh"},{"line_number":78,"context_line":"              name: postgresql-bin"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5fc1f717_312f56a2","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":25},"in_reply_to":"5fc1f717_abcc33bc","updated":"2019-03-13 15:44:51.000000000","message":"Done","commit_id":"e28f6f8959e57bbe870190f938c347d0cc9f58e2"}],"postgresql/templates/postgresql-backup-pvc.yaml":[{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"c5468e429a7c72a54dcfddcac63c0de1e2f86f2e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"limitations under the License."},{"line_number":15,"context_line":"*/}}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"{{- if .Values.conf.backup.volume.enabled }}"},{"line_number":18,"context_line":"---"},{"line_number":19,"context_line":"kind: PersistentVolumeClaim"},{"line_number":20,"context_line":"apiVersion: v1"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_d2331413","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":44},"updated":"2019-03-15 16:19:45.000000000","message":"This should be an AND conditional check on .Values.conf.backup.volume.enabled and .Values.manifests.pvc_backup","commit_id":"074fbea7bbee17546339c76e869e875083ed4b31"}]}
