Commit Graph

32 Commits

Author SHA1 Message Date
Samus CTO 27d1199e90 [FIX] db manager: do not use registry to backup a database
Do not load registry to backup a database. This is
allows backing up databases whose registry cannot
be instantiated at the moment (wrong version, missing
modules, etc.)

Closes #5775
2015-04-02 10:10:04 +02:00
Jos De Graeve 7e7ecf36f1 [FIX] service: error database in use on duplicate database
When trying to duplicate a database, while
having opened connections to it, postgresql throws

```
OperationalError: source database "duplicate_test"
is being accessed by other users
DETAIL:  There is 1 other session using the database.
```

Connections must be dropped before trying duplication
using TEMPLATE to avoid this.
2015-03-27 16:16:02 +01:00
Dharmraj Jhala 01f2c5c9d2 [IMP] Allow custom ordering of files contained in zip dumps
This will allow to speed up our migration platform: as funzip can pipe
the output of the first file of the archive, even if the file is not
fully unzipped yet. This is useful to plays with dump.sql without waiting
for the full archive decompression.
2015-03-18 14:22:22 +01:00
Antony Lesuisse c1c8ac7d7f [FIX] dbmanager: backup allow pg_dump custom dump to be larger than diskspace
- delete a forgotten print
- allow pg_dump custom dumps to be larger than the available disk size, the
  previous commit allowed dumps to be larger than memory, this one remove this
  limitation. zip dumps are still limited to by the disk size.
2015-01-19 02:42:34 +01:00
Antony Lesuisse ec9a543014 [FIX] dbmanager: backup support both zip and pg_dump custom format
- let the user choose between the pg_dump custom format or the zip format including the filestore
- use file objects to allow dumps larger than memory
- postgres subprocess invocation is now clean and thread-safe, we dont touch the local process environ anymore
- add a manifest to the zip dump format with version information about odoo, postgres (pg_dump doesnt output it) and modules
2015-01-19 02:05:12 +01:00
Xavier Morel 92be431236 [REM] asynchronous database creation method
It's broken (though easy to fix) and not very useful, if third parties want to
create databases asynchronously they can handle the asynchronicity on the
client-side (an HTTP request is easy to make asynchronously after all) and
call the synchronous `create_database()`.

fixes #1137, after a fashion
2014-07-15 12:26:55 +02:00
seb 34a931f845 [FIX] server: db service, fix the filestore copy when duplicating a database 2014-06-28 16:37:29 +02:00
Christophe Simonis 1f57528bc6 [MERGE] forward port of branch saas-5 up to 8dfd5ea 2014-06-27 16:14:40 +02:00
Christophe Simonis a4bc65cdba [MERGE] forward port of branch saas-3 up to bdc4dd4 2014-06-27 16:06:37 +02:00
Denis Ledoux 7e9dfa774e [FIX] server: db service, drop connection on drop
On database drop or rename, close the existing sql connections
2014-06-26 13:41:29 +02:00
Fabien Meghazi 83c402a93e Added odoo start command 2014-05-30 17:06:16 +02:00
Christophe Simonis fdd1f69294 [FIX] duplicate/rename/drop database: handle filestore
bzr revid: chs@openerp.com-20140321155659-gvg4br76214lur4l
2014-03-21 16:56:59 +01:00
Christophe Simonis 447d597815 [IMP] new backup format.
The new backup format is a zip containing the sql dump of the
database and the filestore of this database.

Old backups can still be restored

bzr revid: chs@openerp.com-20140304175656-iu3un6q43ttnhjfz
2014-03-04 18:56:56 +01:00
Christophe Simonis ab80456fe7 [IMP] openerp/service/db.py: lint file
bzr revid: chs@openerp.com-20140303160805-ywbtw04jd3022jcv
2014-03-03 17:08:05 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Denis Ledoux 67866db5b6 [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 5015 dle@openerp.com-20140221104908-7ytdg6xkxaza05o4
bzr revid: dle@openerp.com-20140220132700-hhc1nsu25j1ye257
bzr revid: mat@openerp.com-20140220150028-p6l0vnwa5q18uxiu
bzr revid: dle@openerp.com-20140221105500-t7jg037uusdloigl
2014-02-21 11:55:00 +01:00
Denis Ledoux 1b3925fadf [FIX] service: wrong namespace for using tools
bzr revid: dle@openerp.com-20140220132548-fkw19c45mbnejgld
2014-02-20 14:25:48 +01:00
Martin Trigaux c83247c38b [MERGE] Forward-port of latest saas-2 bugfixes, up to rev.5012 revid:mat@openerp.com-20140219134943-60ssztc01cxdtk09
bzr revid: mat@openerp.com-20140219140617-na0q47yaloblb67i
2014-02-19 15:06:17 +01:00
Martin Trigaux e635ebe6c1 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5238 revid:launchpad_translations_on_behalf_of_openerp-20140219053940-dvi4g7ajttoj6h9k
bzr revid: mat@openerp.com-20140219134943-60ssztc01cxdtk09
2014-02-19 14:49:43 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Christophe Simonis 378c908d4c [MERGE] forward port of branch saas-2 up to revid 5006 chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140129094847-4rsg0kjio0ed0rjk
bzr revid: chs@openerp.com-20140129141002-4p8fttm8ii0ogsse
2014-01-29 15:10:02 +01:00
Christophe Simonis 3275de5981 [IMP] ir.attachment: filestore is now in data-dir and by default
bzr revid: chs@openerp.com-20140116185415-ajia02bsty9joox7
2014-01-16 19:54:15 +01:00
Stephane Wirtel 552c76c8b2 [REF] Use the contextlib.closing function instead of a couple of try/catch for
the release of the database cursor.

bzr revid: stw@openerp.com-20140109093258-vmr1a3gaxruo0psp
2014-01-09 10:32:58 +01:00
Sejal Bhut (OpenERP Trainee) dcf8b5e830 [FIX] Database Backup Problem
lp bug: https://launchpad.net/bugs/1100721 fixed

bzr revid: sejalpatel125@gmail.com-20130603092630-3rh4bewi3kihmub7
2013-06-03 14:56:30 +05:30
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Vo Minh Thu 9c4f0bf9d8 [FIX] service.db: forgot to remove the indicing when pooler.get_pool() was replaced.
lp bug: https://launchpad.net/bugs/1162681 fixed

bzr revid: vmt@openerp.com-20130402091852-9hsatm95ej53lllg
2013-04-02 11:18:52 +02:00
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Olivier Dony 8e3ba8e34e [FIX] service.db: missing imports
lp bug: https://launchpad.net/bugs/1155523 fixed

bzr revid: odo@openerp.com-20130318110257-x9591dl74vu8yf2f
2013-03-18 12:02:57 +01:00
Vo Minh Thu df7c209164 [FIX] Better exception handling in tools.convert:
- The exception is not logged in tools.convert. It is loggeg by the netsv layer anyway.
- The exception is re-raised instead, but with the full traceback available.
- A fix in openerp.service.db where the cr is closed twice.

bzr revid: vmt@openerp.com-20130219163047-3q766awd66wkzsn7
2013-02-19 17:30:47 +01:00
Vo Minh Thu 7b789f0865 [FIX] At the end of the database creation polling, None passwords are no more returned (for e.g. the portaluser).
bzr revid: vmt@openerp.com-20130131130447-3obyq2ch2omerypo
2013-01-31 14:04:47 +01:00
Vo Minh Thu 4aacad4abf [REF] services: moved the report service to openerp.service.report.
bzr revid: vmt@openerp.com-20130130155624-u3vfqwd3komo3wfs
2013-01-30 16:56:24 +01:00
Vo Minh Thu 8d23b8a63a [REF] services: moved the db service to openerp.service.db.
bzr revid: vmt@openerp.com-20130130145616-5hijxp9qib7i1uip
2013-01-30 15:56:16 +01:00