* restore with the user connexion to owner's object, intead of the owner who originaly create the database
[IMP]
 * pg_dump command is launch with no owner defined

bzr revid: christophe.chauvet@syleam.fr-20090426090444-glridpyq1llqlac0
This commit is contained in:
Christophe Chauvet
2009-04-26 11:04:44 +02:00
parent 6dcc5a4f9f
commit 63f800a316
+2 -2
View File
@@ -171,7 +171,7 @@ class db(netsvc.Service):
security.check_super(password)
logger = netsvc.Logger()
cmd = ['pg_dump', '--format=c']
cmd = ['pg_dump', '--format=c', '--no-owner']
if tools.config['db_user']:
cmd.append('--username=' + tools.config['db_user'])
if tools.config['db_host']:
@@ -210,7 +210,7 @@ class db(netsvc.Service):
cr.close()
sql_db.close_db('template1')
cmd = ['pg_restore']
cmd = ['pg_restore', '--no-owner']
if tools.config['db_user']:
cmd.append('--username=' + tools.config['db_user'])
if tools.config['db_host']: