美文网首页
nexus3 orientdb数据库文件损坏处理

nexus3 orientdb数据库文件损坏处理

作者: 技术永无止境 | 来源:发表于2021-02-25 22:41 被阅读0次

    Nexus因磁盘空间占满异常停机orientdb数据损坏修复,此处记录处理脚本

    cd /usr/local/soft/sonatype-work4/nexus3/db/accesslog
    cd /usr/local/soft/sonatype-work4/nexus3/db/analytics 
    cd /usr/local/soft/sonatype-work4/nexus3/db/component 
    cd /usr/local/soft/sonatype-work4/nexus3/db/audit 
    cd /usr/local/soft/sonatype-work4/nexus3/db/config 
    cd /usr/local/soft/sonatype-work4/nexus3/db/security
    
    rm -rf *.wal
    
    java -jar /usr/local/soft/nexus-3.13.0-01/lib/support/nexus-orient-console.jar
    
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/accesslog admin admin
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/analytics admin admin
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/component admin admin
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/audit admin admin
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/config admin admin
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/security admin admin
    
    
    REBUILD INDEX *
    REPAIR DATABASE --fix-graph
    REPAIR DATABASE --fix-links
    REPAIR DATABASE --fix-ridbags
    REPAIR DATABASE --fix-bonsai
    DISCONNECT
    
    数据库备份恢复:
    java -jar /usr/local/soft/nexus-3.13.0-01/lib/support/nexus-orient-console.jar
    CONNECT PLOCAL:/usr/local/soft/sonatype-work4/nexus3/db/component admin admin
    BACKUP DATABASE /usr/local/soft/nexus-3.13.0-01/backup/component20210226
    RESTORE DATABASE  /usr/local/soft/nexus-3.13.0-01/backup/component20210226
    RESTORE DATABASE  /usr/local/soft/nexus-3.13.0-01/backup/component-2021-02-25-22-33-54-3.13.0-01.bak
    
    java -jar /usr/local/soft/nexus-3.13.0-01/lib/support/nexus-orient-console.jar
    export database component-export
    drop database
    create database plocal:/usr/local/soft/sonatype-work4/nexus3/db/component admin admin
    import database component-export.json.gz -preserveClusterIDs=true
    rebuild index *
    disconnect
    
    
    
    /usr/local/soft/nexus-3.13.0-01/bin/nexus run
    

    参考博客:Nexus因磁盘空间占满异常停机orientdb数据损坏修复

    修复Nexus数据库

    相关文章

      网友评论

          本文标题:nexus3 orientdb数据库文件损坏处理

          本文链接:https://www.haomeiwen.com/subject/fgdpfltx.html