[IMP]Odoo backup script : add host namespace

This commit is contained in:
Fabien BOURGEOIS 2018-09-28 08:14:01 +02:00
parent eb3724031c
commit 38577171a1

View File

@ -17,7 +17,8 @@ def dump(odoo, bakpath, password, dbnames, format_):
""" Dumps a database list """ """ Dumps a database list """
for dbname in dbnames: for dbname in dbnames:
dumpf = odoo.db.dump(password, dbname, format_) dumpf = odoo.db.dump(password, dbname, format_)
fpath = '{bakpath}/{date}_{dbname}.{fmt}'.format(bakpath=bakpath, fpath = '{bakpath}/{date}_{host}_{dbname}.{fmt}'.format(bakpath=bakpath,
host=odoo.host,
dbname=dbname, dbname=dbname,
date=datefmt(), date=datefmt(),
fmt=format_) fmt=format_)