If an external filestore is used for document management, database backup does not include the backup of the attachments

Bug #478186 reported by Ferdinand
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Opinion
Wishlist
Unassigned

Bug Description

attachments are stored in
openobject-server/bin/filestore/<dbname>
a backup just takes a copy of the database content , not of the attachments

so the cylce backup/restore looses data.
especially tricky if postgres-db and openerp-server run on different computers.

absolute minimum requirement is to add this information to the backup menu
* Backup Database (without attachments)
* Restore Database (without attachments)
help="Attachments are stored in openobject-server/bin/filestore/<dbname> and must be backuped separately"

a better solution would be of course to include the attachments in the backup/restore process (which IMHO has to be redesigned to use a storage location on the server and avoid transfer of mass data to and from the client.)

Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi Ferdinand

I think it's not a bug, because the menu's title is backup database, but a new menu can appear to "backup openerp" and include Database and DMS content

I don't know if for the next version, a blueprint was created, but it would be a usefull feature.

description: updated
Revision history for this message
Ferdinand (office-chricar) wrote :

as usual - not a technical bug - but without deep knowledge - who knows that attachments are NOT stored in the database ?
OpenERP has to be userfriendly. (target of 5.x)
so the minimum is to tell...

Revision history for this message
Ferdinand (office-chricar) wrote :

btw there is also a high availablility issue
for the database itself the problem can be handled using
* http://www.postgresql.org/docs/8.3/static/continous-archiving.html
* https://projects.commandprompt.com/public/pitrtools
* http://pgcluster.projects.postgresql.org/1_3/index.html

nevertheless these concepts do ont know anything about filestore :-(

Revision history for this message
Richard (John) Nopkins@Servosoft (richard-nopkins) wrote :

Excellent invention Ferdinand!

Changed in openobject-server:
importance: Undecided → Wishlist
Revision history for this message
xrg (xrg) wrote : Re: [Bug 478186] Re: database backup does not backup attachments - DATA LOSS

On Friday 05 February 2010, you wrote:
> ** Changed in: openobject-server
> Importance: Undecided => Wishlist
>

If you want SQL, complete backups of your db, you should use the 'db' storage
engine of document.

Otherwise, your backup should be taken against the server, with a custom shell
script (much better than a client, gui-driven action). That should also backup
all your document storage[1] places.

[1] note that as of 5.2, the storage spaces will be multiple.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 478186] Re: database backup does not backup attachments - DATA LOSS

BTW, on 5.0, a warning has been put in the documentation of the document
module, so at least, users will be warned about this behavior.

On Mon, Feb 8, 2010 at 10:04 AM, xrg <email address hidden> wrote:

> On Friday 05 February 2010, you wrote:
> > ** Changed in: openobject-server
> > Importance: Undecided => Wishlist
> >
>
> If you want SQL, complete backups of your db, you should use the 'db'
> storage
> engine of document.
>
> Otherwise, your backup should be taken against the server, with a custom
> shell
> script (much better than a client, gui-driven action). That should also
> backup
> all your document storage[1] places.
>
>
> [1] note that as of 5.2, the storage spaces will be multiple.
>
> --
> database backup does not backup attachments - DATA LOSS
> https://bugs.launchpad.net/bugs/478186
> You received this bug notification because you are subscribed to
> OpenObject Server.
>
> Status in OpenObject Server: New
>
> Bug description:
> attachments are stored in
> openobject-server/bin/filestore/<dbname>
> a backup just takes a copy of the database content , not of the attachments
>
> so the cylce backup/restore looses data.
> especially tricky if postgres-db and openerp-server run on different
> computers.
>
> absolute minimum requirement is to add this information to the backup menu
> * Backup Database (without attachments)
> * Restore Database (without attachments)
> help="Attachments are stored in openobject-server/bin/filestore/<dbname>
> and must be backuped separately"
>
> a better solution would be of course to include the attachments in the
> backup/restore process (which IMHO has to be redesigned to use a storage
> location on the server and avoid transfer of mass data to and from the
> client.)
>
>
>
>
>

Revision history for this message
Ferdinand (office-chricar) wrote : Re: database backup does not backup attachments - DATA LOSS

I just want to ask if this will be provided in V6 ?

IMHO a professional backup/restore functionality must provide a full functional restored database which currently is not the case and hence can not be considered as user/admin friendly.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 478186] Re: database backup does not backup attachments - DATA LOSS

On Friday 06 August 2010, you wrote:
> I just want to ask if this will be provided in V6 ?
>
> IMHO a professional backup/restore functionality must provide a full
> functional restored database which currently is not the case and hence
> can not be considered as user/admin friendly.

IMHO, the 'database backup' menu is fundamentaly wrong in the first place. If
you think of it, being able to dump the whole db to a remote client is *bad*.

But, some people don't understand Unix, and want such features.. I'd just wipe
the word "professional" from that.

FYI, by default, in v6 the attachment storage is in the db. So, a dump would
include the files. However, I'd be interested to see how would a large pile of
data (the whole db) be transferred over RPC.

Revision history for this message
Ferdinand (office-chricar) wrote : Re: database backup does not backup attachments - DATA LOSS
Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

I'm agree to put thi in documentation in document module as Raphael said.
------
BTW.
In backup on server-side it depends of the company, if is a medium or little company, this kind of client-side backup is usefull, in other hands, it should be done on server-side ¿How?, put a new entry on config-file For v6.0:

backup_method = [default 'Cient' ('Server')('Client')('Configurable')]

Revision history for this message
Ferdinand (office-chricar) wrote :

I do not think that it is very useful to put some information in the document module, that something does not work "completely"
and which can be fixed with a few lines of code. ;-)

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Indeed in v6.0 this all works out-of-the-box by default, unless the admin explicitly adds file stores, in which case he is obviously aware of it, as he selected the location.
Backing up data properly still remains the responsibility of the system admin/integrator, OpenERP only provides some tools to help a little bit.

Changed in openobject-server:
status: New → Opinion
summary: - database backup does not backup attachments - DATA LOSS
+ If an external filestore is used for document management, database
+ backup does not include the backup of the attachments
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Its posible configure the attachment path in server? IMHO this can help

Regards,

Revision history for this message
xrg (xrg) wrote : Re: [Bug 478186] Re: If an external filestore is used for document management, database backup does not include the backup of the attachments

On Wednesday 24 November 2010, you wrote:
> Its posible configure the attachment path in server? IMHO this can help
>
> Regards,

> absolute minimum requirement is to add this information to the backup menu
> * Backup Database (without attachments)
> * Restore Database (without attachments)

Olivier, remember, I told you to disable this "dump" feature!

A button in the Gtk client can never make up for bad administrator's
practices.

Revision history for this message
Ferdinand (office-chricar) wrote :

that's why
https://blueprints.launchpad.net/openobject-server/+spec/database-handling-serverside
exists.

it should start a parameterized preconfigured script, which the admin could modify. the parameters should be in the server rc file

the same or a similar script should be run from cron to do the "professional" backup

why let/ask all the admins to reinvent the wheel.

Revision history for this message
xrg (xrg) wrote :

On Wednesday 24 November 2010, you wrote:
> that's why
> https://blueprints.launchpad.net/openobject-server/+spec/database-handling-
> serverside exists.

Yes, I agree with the blueprint.

The idea of passing the whole database chunk through a RPC chunk has been
flawed by design. It is bound to fail one day, and a bad administrator (by
Murphy's law) will not notice that until he really tries to restore the db.

That's why I advise to avoid that method.

> why let/ask all the admins to reinvent the wheel.

Exactly. Postgres itself and the filesystem of the server provide so many nice
tools to backup a server. Why replicate them inside OpenERP?

Revision history for this message
Ferdinand (office-chricar) wrote :

I have to come back on this

the new book "Drive your Sales ..."
describes the backup / restore process of the db - without mentioning that all attachment in filestore are NOT included.

although it mentiones in chapter 9.3 that the attachments may not be stored in the db.

IMHO this should be mentioned as text comment in the popup of database backup.
So at least people will know .....

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.