Archiving Cases 1 & 2

-- No links to archived assembly left in other assemblies (liftOvers may or may not be present -- the only difference would be leaving the db off the mirror exclude list if liftOvers are present.).

Rationale

Databases that have no links pointing to or from other assemblies (nets/chains or Conservation tracks or liftOver) can be completely removed from hgcentral on the RR. Tables in hgcentral on hgarchive1 will not mention any other assemblies. /gbdb/[db] files will not be needed by mirrors and can be added to the mirror exclude list.

Set up database on hgarchive1:

  • Push and prune hgcentral table. The blatServers, sessionDb, and userDb tables should exist on hgcentarch[DbName], but should be empty. (No BLAT servers are available for archived dbs.) The remaining tables should be pruned so that only the relevant information is retained. For Case 1 (no links to other orgs from archived db):
    On hgwbeta:
    hgsqldump --all -d -c hgcentralbeta blatServers sessionDb userDb > ~/hgcentral.sql
    hgsqldump --all -c hgcentralbeta clade dbDb defaultDb gdbPdb genomeClade liftOverChain >> ~/hgcentral.sql
    
    (if using hgcentral, add '-h genome-centdb' after the '-c' above)
    
    

    mysql on hgarchive1
    --------------------

    hgarchive1> mysql -A --user=hgcat -p  anydb
    
    CREATE DATABASE hgcentarchRheMac1;
    USE hgcentarchRheMac1;
    SOURCE ~/hgcentral.sql
    
    UPDATE defaultDb SET name = 'rheMac1' WHERE genome = 'Rhesus';
    DELETE FROM defaultDb WHERE name != 'rheMac1';
    DELETE FROM dbDb WHERE name != 'rheMac1'; 
    DELETE FROM liftOverChain WHERE fromDb != 'rheMac1' AND toDb!='rheMac1';
    DELETE FROM clade WHERE name != 'vertebrate';
    DELETE FROM genomeClade WHERE genome != 'Rhesus';
    
    check:
    SELECT COUNT(*) FROM blatServers;
    SELECT COUNT(*) FROM userDb;
    SELECT COUNT(*) FROM sessionDb;
    
    SELECT name, active FROM dbDb ORDER BY active, name;
    SELECT * FROM defaultDb;
    SELECT name, active FROM dbDb;
    SELECT * FROM clade;
    SELECT * FROM liftOverChain;
    SELECT * FROM genomeClade;