惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

博客园 - 一望无际的南

wps转PDF-解决IPAD中PDF乱码问题 thinkserver TS250 虚拟化主机部署 小微企业的数据备份方案 mac idea 修改git账号 coder,不要做计算机,好吗? mac 同一应用多实例的切换 沙雕的git Plugin 一行命令完成linux对文件的授权 jira 8.x 性能调优 NODEJS npm build 中哪些乱码是什么? DT 还是IT 混乱的docker swarm 版本在运维的重要性 nginx 在linux下端口被禁用问题 2020年服务器迁移 当,规范什么都不是 记阿里云SLB后配置Nginx反向代理百度地图API的坑 gradle介绍 Centos7 改名问题
bitbucket灾难恢复或者服务迁移指南
一望无际的南 · 2020-01-31 · via 博客园 - 一望无际的南


注意:
本教程适合bitbucket的灾难恢复或者服务迁移

前提条件
已经使用bitbucket backup client 做了备份

环境说明

* centos 7
* SQL Server 2012
* Java 1.8
* Bitbucket

old edition - Atlassian Bitbucket v6.3.0
new edition - Atlassian Bitbucket v6.10.0

术语
bitbucket.home 指bitbucket的数据目录
例如: /var/atlassian/application-data/bitbucket
bitbucket 运行目录,指应用目录
例如: /opt/atlassian/bitbucket/[version]


参考文档:
[Using the Bitbucket Server Backup Client](https://confluence.atlassian.com/bitbucketserver/using-the-bitbucket-server-backup-client-776640064.html)

操作步骤:

> 1 - Create a new empty home directory using the user account that will be used to run Bitbucket Server.
```shell
chown atlbitbucket:atlbitbucket /path/to/[bitbucket.home]
```
> 2 - Create the 2 emtpy databases for importing old database and the new one
It should have the configuration described in the ' Create the Bitbucket Server database' section of the relevant page here:
MySQL
Oracle
PostgreSQL
SQL Server

**Even the new one will be retird but it will be used in restore process.**

> 3 - Run the Restore Client. See the following section for details.

here is an exmaple,
```shell
java -Djdbc.override=true -Djdbc.driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" -Djdbc.url="jdbc:sqlserver://192.168.0.22:1433;databaseName=bit2_db;" -Djdbc.user="bit_user" -Djdbc.password="*****" -Dbitbucket.home="/disk2/atlassian/application-data/bitbucket" -jar bitbucket-restore-client.jar /root/bitbucket-20200130-225735-289.tar
```

> 4 - starting to install toally new one of bitbucket

*Install Bitbucket server on the new server by following the instructions on Running the Bitbucket Server installer. Point the installation to an empty directory and install it as a service in case you used to have that in your previous server.*

Make sure your new installation is up and running - refer to Starting and stopping Bitbucket Server. At this stage you should see Bitbucket server guiding you for a configuration from scratch (i.e. it will ask you for license details, admin user etc.) and that's expected.

> 5 -Stop the newly installed instance.

```shell
su - atlbitbucket
cd /opt/atlassian/bitbucket/[version]/bin
sh stop-bitbucket.sh

```
> 6 - rename the new installed HOME directory & rename the old one to the HOME

be careful, change the owner of the HOME directory
```shell
chown atlbitbucket:atlbitbucket /path/to/HOME
```

> 7 - start bitbucket seeing step 5th;

sh start-bitbucket.sh


> 启动后,可能有多种原因无法启动:

1. 在HOME下面的shared bitbucket.properties 数据库连接需要配置为登录到老的数据库
2. 注意: app_property表,与新建的实例的数据库比较,更新为新的实例的一样。
* instance.home
* license
* server.id

再重启,正常了。