How to use the pgtricks.pg_dump_splitsort.split_sql_file function in pgtricks

To help you get started, we’ve selected a few pgtricks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github akaihola / pgtricks / pgtricks / pg_incremental_backup.py View on Github external
def main() -> None:
    opts = parse_arguments()
    output_file = os.path.join(opts.output_dir,
                               '{}.sql'.format(opts.database))
    for path in glob(os.path.join(opts.output_dir, '*.sql')):
        os.remove(path)
    dump_database(opts.database, output_file)
    split_sql_file(output_file)
    os.remove(output_file)
    commit_database(opts.output_dir, opts.remote)

pgtricks

PostgreSQL utilities

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

56 / 100
Full package analysis

Similar packages