Project

General

Profile

Actions

Feature #1128

closed

import/export/copy data between two databases

Added by Jim Pulokas almost 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Sinedon
Target version:
-
Start date:
01/10/2011
Due date:
% Done:

0%

Estimated time:
Deliverable:

Description

Need ability to export from one database and import into another. This should recursively preserve all associated references between objects and preserve timestamps. For example, assuming some global DB config was done in sinedon.cfg:

import sinedon
import sinedon.transfer   # a hypothetical module for doing the transfer
import leginon.leginondata

# export 10 most recent images from first database
sinedon.setConfig('leginondata', db='leginondb1')
imagequery = leginon.leginondata.AcquisitionImageData()
images = imagequery.query(results=10)

# import them into the second database
sinedon.setConfig('leginondata', db='leginondb2')
siedon.transfer.transfer(images)

The result would be that leginondb2 will now contain copies of the image data plus any references to SessionData (create new unique session), AcquisitionImageTargetData, etc...


Related issues 1 (0 open1 closed)

Blocked by Leginon - Bug #1173: appion can not find project for experiment using branch myami-dbcopyWon't Fix or Won't Do Anchi Cheng02/05/2011

Actions
Actions

Also available in: Atom PDF