Changeset f2377be in rattail


Ignore:
Timestamp:
07/05/18 02:09:16 (2 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
e0295ed
Parents:
08730f1
Message:

Suppress verbosity for db dump commands, for rattail backup

for now, until we figure out how we want to handle verbosity...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail/commands/backup.py

    r08730f1 rf2377be  
    222222
    223223            # okay let's rsync
    224             cmd = ['rsync', '--archive', '--delete-during', '--progress'] + excludes + [prefix, destination]
     224            rsync = ['rsync', '--archive', '--delete-during']
     225            if False: # TODO
     226                rsync.append('--progress')
     227            cmd = rsync + excludes + [prefix, destination]
    225228            log.debug("rsync command is: %s", cmd)
    226229            if not dry_run:
     
    287290            if not dry_run:
    288291                sql_path = os.path.join(outdir, '{}-mysql.sql'.format(name))
    289                 subprocess.check_call(['mysqldump', '--verbose', name, '--result-file={}'.format(sql_path)])
     292                verbose = '--verbose' if False else '' # TODO
     293                subprocess.check_call(['mysqldump', verbose, name, '--result-file={}'.format(sql_path)])
    290294                subprocess.check_call(['gzip', '--force', sql_path])
    291295                gz_path = "{}.gz".format(sql_path)
     
    301305                if os.path.exists(tmp_path):
    302306                    os.remove(tmp_path)
    303                 subprocess.check_call(['sudo', '-u', 'postgres', 'pg_dump', '--verbose', name, '--file={}'.format(tmp_path)])
     307                verbose = '--verbose' if False else '' # TODO
     308                subprocess.check_call(['sudo', '-u', 'postgres', 'pg_dump', verbose, name, '--file={}'.format(tmp_path)])
    304309                subprocess.check_call(['chown', 'root:', tmp_path])
    305310                subprocess.check_call(['mv', tmp_path, sql_path])
Note: See TracChangeset for help on using the changeset viewer.