From 4abb5436cf0e39d896954a656c8805abfc4ce4e7 Mon Sep 17 00:00:00 2001 From: Roy Williams Date: Fri, 10 Jun 2022 06:48:51 +0000 Subject: [PATCH] fixed dump scripts --- services/annotations_dump.py | 4 ++-- services/crossmatch_tns_dump.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/annotations_dump.py b/services/annotations_dump.py index d910641a..71000c60 100644 --- a/services/annotations_dump.py +++ b/services/annotations_dump.py @@ -12,8 +12,8 @@ if not os.path.exists(settings.ANNOTATIONS_DUMP): os.makedirs(settings.ANNOTATIONS_DUMP) -cmd = 'mysqldump -u %s -p%s --port=%s --host=lasair-dev-db ztf annotations > %s/annotations.sql' -cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.ANNOTATIONS_DUMP) +cmd = 'mysqldump -u %s -p%s --port=%s --host=%s ztf annotations > %s/annotations.sql' +cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.DB_HOST, settings.ANNOTATIONS_DUMP) os.system(cmd) cmd = 'mysql -u %s -p%s --port=%s --host=%s ztf -e "select count(*) from annotations" >> %s' diff --git a/services/crossmatch_tns_dump.py b/services/crossmatch_tns_dump.py index 3af17301..5cf8c8f6 100644 --- a/services/crossmatch_tns_dump.py +++ b/services/crossmatch_tns_dump.py @@ -12,12 +12,12 @@ if not os.path.exists(settings.CROSSMATCH_TNS_DUMP): os.makedirs(settings.CROSSMATCH_TNS_DUMP) -cmd = 'mysqldump -u %s -p%s --port=%s --host=lasair-dev-db ztf crossmatch_tns > %s/crossmatch_tns.sql' -cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.CROSSMATCH_TNS_DUMP) +cmd = 'mysqldump -u %s -p%s --port=%s --host=%s ztf crossmatch_tns > %s/crossmatch_tns.sql' +cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.DB_HOST, settings.CROSSMATCH_TNS_DUMP) os.system(cmd) cmd = 'mysql -u %s -p%s --port=%s --host=%s ztf -e "select count(*) from crossmatch_tns" >> %s' -cmd = cmd % (settings.DB_USER_READONLY, settings.DB_PASS_READONLY, settings.DB_PORT, settings.DB_HOST, logfile) +cmd = cmd % (settings.DB_USER_READONLY, settings.DB_PASS_READONLY, settings.DB_PORT, settings.DB_HOST, logfile) os.system(cmd) cmd = 'ls -l %s/crossmatch_tns.sql >> %s'