This forum is now just an archive. Use the new Q&A website
It is currently Thu Apr 24, 2014 7:32 am

All times are UTC + 2 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Migrating attachments from Database to Internal File storage
PostPosted: Thu Mar 01, 2012 3:05 am 
Offline

Joined: Fri Aug 12, 2011 5:27 am
Posts: 39
Location: Wellington, NZ
We are in the process of upgrading from 6.0.3 to 6.1. As work through this, we figure it's a good time to move the attachments out of the database and onto disk (Internal File storage).

I installed the document module (Integrated Document Management System/Knowledge Management) and have that working. The files are still there and accessible if I continue to use the Database 'Storage Media', so no immediate loss of documents. It is fairly well implied that there is no automated migration of the database attachments to disk.

Before I get carried away reinventing the wheel by putting together an automated process to take the files out of the database and put them onto the disk ... has anyone done that?


Top
 Profile  
 
 Post subject: Re: Migrating attachments from Database to Internal File sto
PostPosted: Sun Nov 11, 2012 8:47 pm 
Offline

Joined: Tue Jul 13, 2010 12:46 pm
Posts: 19
hello,

any progress with moving files between database storage to internal? script or something?

i tried creating a directory with an internal file storage as storage type, then tried moving the file from the first database storage directory to the new internal storage directory but it i faced an error:
File ".../addons/document/document_storage.py", line 747, in simple_move
raise NotImplementedError('Cannot move files between storage media')

any help from ur experience is much appreciated!


Top
 Profile  
 
 Post subject: Re: Migrating attachments from Database to Internal File sto
PostPosted: Sun Nov 11, 2012 9:13 pm 
Offline

Joined: Mon Aug 08, 2011 9:52 am
Posts: 273
Location: Reeuwijk Netherlands
I do not have a solution for this.
But I have a remark with internal versus external filestore.

As far as I found out internal file store gives you coded real names. External filestore works with the original filenames.


Top
 Profile  
 
 Post subject: Re: Migrating attachments from Database to Internal File sto
PostPosted: Sun Nov 11, 2012 10:00 pm 
Offline

Joined: Tue Jul 13, 2010 12:46 pm
Posts: 19
ton123 wrote:
I do not have a solution for this.
But I have a remark with internal versus external filestore.

As far as I found out internal file store gives you coded real names. External filestore works with the original filenames.


Thanks for the remark ton,
i also think external file storage is more versatile but at the moment the changed file name is not an important issue, especially with related bugs such as this one https://bugs.launchpad.net/openobject-addons/+bug/1062258.


Top
 Profile  
 
 Post subject: Re: Migrating attachments from Database to Internal File sto
PostPosted: Fri Nov 30, 2012 8:59 am 
Offline

Joined: Mon Aug 08, 2011 9:52 am
Posts: 273
Location: Reeuwijk Netherlands
@3a2roub
I didn't test it but maybe this is a workaround.
1 make a backup of your database
2 save your documents with openerp ftp filesystem setting with a ftp program in a normal file structure.
3 reconfigure your OpenERP from database store to file store.
4 upload with ftp program from normal filestructure to openerp ftp filesystem

I am very interesting in your findings......

I have two problems with knowledge management.
Can' t get the search function working.
Can't upload documents to directories other than the document directory.

Any solutions for these issues?


Top
 Profile  
 
 Post subject: Re: Migrating attachments from Database to Internal File sto
PostPosted: Fri Nov 30, 2012 9:02 am 
Offline

Joined: Mon Aug 08, 2011 9:52 am
Posts: 273
Location: Reeuwijk Netherlands
@ibeardslee
Did you find the answers and want to share them with us?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP