CGI-NRM / SeqDB-documentation

MIT License
0 stars 1 forks source link

psql , how to export and import a subset from the db ? #43

Open Inkimar opened 4 years ago

Inkimar commented 4 years ago

now have a single instance of seqdb serving 2 units at the museum ('DNA-LAB' and 'DNA-CGI'). The questions has really to do with if one of the units (for instance the 'DNA-LAB' ) imports a rack (96 viles) where the metadata is wrong in a way that cannot be fixed with the bulk-export/-import (for instance using the wrong 'collection code' or 'Group Name') . My ideal use-case would be that I could help them to 'roll back' that single rack ( either with a bulk-delete on the rack-id in seqdb or using an sql-script) , removing that specimen-&sample-import from SeqDB. So the question about backup-strategies has to do with that use-case - I might be going around this in the wrong way ? I have been taking nightly backups of the whole schema since the beginning, that is a bit course-grained strategy and restoring that backup will mean that one of the departments will loose 'todays-imports'. I was wondering if I could take a separate 'DNA-LAB'-backup and a 'DNA-CGI'-backup using an sql-script where I pinpoint the 'Group Name' - then I could restore a subset of the database, for instance the 'DNA-LAB'. Or would you think that the best strategies is to have 2 instances : one for the 'DNA-LAB' and one for the 'DNA-CGI' ?