data migration stage --> prod

13 views
Skip to first unread message

Alex

unread,
Sep 18, 2014, 9:03:45 AM9/18/14
to lily-d...@googlegroups.com
I have a requirement to move certain records from stage to production environments.

Is there a way to export / import data from existing lily instance to move to another instance?

thanks,

Alex

Alex

unread,
Sep 19, 2014, 4:01:29 PM9/19/14
to lily-d...@googlegroups.com
I am writing a procedure to scan records from stage repository and create them in production.
Getting an error on record type version mismatch.

org.lilyproject.repository.api.RecordTypeNotFoundException: RecordType '4c8f8ca7-31c0-4e08-a98e-25cfc747da5d' version: '2' could not be found.

Destination repository's latest version of the specified record type is 1.  Am I doing it wrong?  I dont see record.setRecordTypeVersion method, only a getter...

code snippet is below

     RecordScan scan = new RecordScan();
        scan.setRecordFilter(new RecordTypeFilter(new QName(NS, "Twitterer")));
        RecordScanner scanner = sourceRepo.getDefaultTable().getScanner(scan);
        final LTable destinationTable = destinationRepo.getDefaultTable();
        for (Record record : scanner) {

            Record copy = record.clone();
            copy = destinationTable.create(copy);
            PrintUtil.print(copy, destinationRepo);
        }
Reply all
Reply to author
Forward
0 new messages