confluence -- 命令行备份还原

备份:confluence每日凌晨2:00都在 /data/atlassian/application-data/confluence/backups/ 下生成备份包,其中包括文档,附件,用户
还原:对于较小的包可以直接在web界面上传,对于大于25M的包,需要上传到confluence所在服务器的cd /data/atlassian/application-data/confluence/restore ,再还原

备份包的导入有两种方式: UI界面导入 / 命令行导入
此处主要介绍命令行导入的操作。

服务端命令行插件安装

插件上传与安装,> = 9.0版本
下载:https://marketplace.atlassian.com/apps/10886/atlassian-command-line-interface-cli?hosting=cloud&tab=overview ,get it now

在官网获取许可证(有30d免费版),并更新

客户端安装

官网下载客户端 >= 9.0版本
下载:https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/16875586/Downloads
cd /usr/local
unzip atlassian-cli-9.0.0-distribution.zip
cd atlassian-cli-9.0.0
mv acli-server.properties acli.properties

cat acli.properties
# Example Server configuration - customize and rename this file to acli.properties

credentials       = --user confluenceuser --password confluencepasswd    #confluence管理员的用户名密码

myjira            = jira -s https://jira.examplegear.com ${credentials}
myconfluence      = confluence -s https://swiki-confluence.intsig.net ${credentials}     #confluence的url

# This defines the default client for actions, choose the most likely used client
default           = ${myconfluence}   #修改此处

导入备份包命令执行

 ./acli.sh  --action restoreExport --file "backup-2019_07_30.zip"   --debug --options noWait  

导入完成后,到UI界面验证导入成功。

猜你喜欢

转载自www.cnblogs.com/huandada/p/11794282.html