From 63f800a31619ec784b274b4edcb6f40cfe1bb118 Mon Sep 17 00:00:00 2001 From: Christophe Chauvet Date: Sun, 26 Apr 2009 11:04:44 +0200 Subject: [PATCH] [FIX] * 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 --- bin/service/web_services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 4045b4120a2..f57137940d4 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -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']: