配置gitlab自动备份
在gitlab机器的root用户执行
首先,假设有2台机器。
- gitlab 1.1.1.1
- backup 2.2.2.2
做秘钥信任
- gitlab root 生成 ssh-key
- copy密钥到backup机器的ubuntu用户。
- clone 自动备份脚本
- 配置自动备份任务
- 配置定时任务
ssh-keygen -t rsa
ssh-copy-id ubuntu@2.2.2.2
root@gitlab # git clone https://github.com/sund/auto-gitlab-backup.git
remoteUser="ubuntu"
remoteServer="2.2.2.2" # remote ip
remoteDest="/home/ubuntu/gitlab-backup"
backupConfigs="1"
contab -e
5 5 * * * /root/auto-gitlab-backup/auto-gitlab-backup.sh > /dev/null 2>&1 &
auto-gitlab-backup.sh的rsync支持daemon格式,也支持直接从ssh协议同步。
我配置daemon折腾了好久,没成功。。。
配置gitlab自动备份的更多相关文章
- gitlab自动备份和定时删除
GitLab数据手动备份1.GitLab默认备份目录为/var/opt/gitlab/backups,可以修改/etc/gitlab/gitlab.rb里面的默认存放备份文件目录,这里使用默认备份目录 ...
- 内网jenkins如何配置gitlab自动拉取代码打包
在全局工具配置中添加git安装目录的配置 http://10.2.1.92:8080/jenkins/configureTools/git1.8.3.1/usr/bin/git 打开系统设置配置git ...
- gitlab自动备份恢复与卸载
一.gitlab数据备份gitlab-rake gitlab:backup:create命令会在/var/opt/gitlab/backups目录下创建一个名称类似为1393513186_gitlab ...
- gitlab自动备份脚本auto_backup_to_remote
!/bin/bash gitlab 服务器备份路径 LocalBackDir=/var/opt/gitlab/backups 远程备份服务器 gitlab备份文件存放路径 RemoteBackDir= ...
- gitlab自动备份
1.周期性计划任务: $crontab -e 0 0 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create $service crond res ...
- GitLab 数据自动备份
gitlab自动备份 周期性计划任务: crontab -e * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create service crond ...
- Gitlab日常维护(三)之Gitlab的备份、迁移、升级
一.Gitlab的备份 使用Gitlab一键安装包安装Gitlab非常简单, 同样的备份恢复与迁移也非常简单. 使用一条命令即可创建完整的Gitlab备份 [root@gitlab ~]# gitla ...
- 在linnux下,配置自动备份oacle
以oracle身份登录到linux,在oracle home目录下创建目录 shell $ mkdir shell 创建自动备份脚本 $ cd shell $ touch expdp.sh $ chm ...
- Confluence 6 配置自动备份
希望配置 Confluence 备份: 进入 > 基本配置(General Configuration) > 备份管理(Backup administration). 选择 编辑(Edi ...
随机推荐
- zk observer 节点
zk 集群中有3种节点:leader,follower,observer,其中 observer 节点没有投票权,即它不参与选举和写请求的投票. 比较 Follower 和 Observer 的代码: ...
- SpringApplication执行流程
SpringApplication类的直接作用是在main方法中通过自有的run方法启动spring应用. 具体的run方法为: public static ConfigurableApplicati ...
- scrapy框架初级
scrapy入门教程:https://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/tutorial.html 一.安装 python模块网站,应用文件放置在s ...
- pip 安装 nexmo
pip install nexmo报错 是因为缺少 libffi-devel 需要 yum install libffi-devel 然后再执行 pip install nexmo 即可成功
- numpy.where() 用法详解
numpy.where (condition[, x, y]) numpy.where() 有两种用法: 1. np.where(condition, x, y) 满足条件(condition),输出 ...
- python脚本 FTP上传学习
学习了这个博文http://www.cnblogs.com/cacique/archive/2012/08/24/2653686.html,楼主这个文章很适合初学者,所以根据楼主的内容推演了下上传文件 ...
- centos7 安装python3.6 脚本
shell 脚本自动安装python3 # /bin/bash cd /opt yum groupinstall "Development tools" -y yum -y ins ...
- grep语法2
grep 参数 -n :显示行号-o :只显示匹配的内容-q :静默模式,没有任何输出,得用$?来判断执行成功没有,即有没有过滤到想要的内容 -l :如果匹配成功,则只将文件名打印出来,失败则 ...
- nf_conntrack
How to Fix Nf_conntrack Table Full Dropping Packet Linux CentOS PacketLoss 2 minutes to read (234 w ...
- Windows跨域远程连接防火墙设置
按照正常的防火墙的设置,发现跨域远程依然不行,后来进过排除法发现 还需要打开icmpv4所有的协议,才可以