nexus3 orientdb数据库文件损坏处理

2021-02-25  本文已影响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数据库

上一篇下一篇

猜你喜欢

热点阅读