在gitlab机器的root用户执行

首先,假设有2台机器。

  1. gitlab 1.1.1.1
  2. backup 2.2.2.2

做秘钥信任

  1. gitlab root 生成 ssh-key
  2. copy密钥到backup机器的ubuntu用户。
  3. clone 自动备份脚本
  4. 配置自动备份任务
  5. 配置定时任务
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自动备份的更多相关文章

  1. gitlab自动备份和定时删除

    GitLab数据手动备份1.GitLab默认备份目录为/var/opt/gitlab/backups,可以修改/etc/gitlab/gitlab.rb里面的默认存放备份文件目录,这里使用默认备份目录 ...

  2. 内网jenkins如何配置gitlab自动拉取代码打包

    在全局工具配置中添加git安装目录的配置 http://10.2.1.92:8080/jenkins/configureTools/git1.8.3.1/usr/bin/git 打开系统设置配置git ...

  3. gitlab自动备份恢复与卸载

    一.gitlab数据备份gitlab-rake gitlab:backup:create命令会在/var/opt/gitlab/backups目录下创建一个名称类似为1393513186_gitlab ...

  4. gitlab自动备份脚本auto_backup_to_remote

    !/bin/bash gitlab 服务器备份路径 LocalBackDir=/var/opt/gitlab/backups 远程备份服务器 gitlab备份文件存放路径 RemoteBackDir= ...

  5. gitlab自动备份

    1.周期性计划任务: $crontab -e 0 0 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create $service crond res ...

  6. GitLab 数据自动备份

    gitlab自动备份 周期性计划任务: crontab -e * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create service crond ...

  7. Gitlab日常维护(三)之Gitlab的备份、迁移、升级

    一.Gitlab的备份 使用Gitlab一键安装包安装Gitlab非常简单, 同样的备份恢复与迁移也非常简单. 使用一条命令即可创建完整的Gitlab备份 [root@gitlab ~]# gitla ...

  8. 在linnux下,配置自动备份oacle

    以oracle身份登录到linux,在oracle home目录下创建目录 shell $ mkdir shell 创建自动备份脚本 $ cd shell $ touch expdp.sh $ chm ...

  9. Confluence 6 配置自动备份

    希望配置 Confluence 备份: 进入  > 基本配置(General Configuration) > 备份管理(Backup administration). 选择 编辑(Edi ...

随机推荐

  1. 实践:搭建基于Load Balancer的MySql Cluster

    服务器规划: 整套系统全部在rhel5u1 server 64位版本下,由基于xen的虚拟机搭建,其中集群管理节点*2.SQL节点*2.数据节点*4.Web服务节点*2组成,其中数据节点做成2个组,每 ...

  2. 各大型网站架构分析收集-原网址http://blog.csdn.net/lovingprince/article/details/3379710

    1. PlentyOfFish 网站架构学习http://www.dbanotes.net/arch/plentyoffish_arch.html 采取 Windows 技术路线的 Web 2.0 站 ...

  3. 常用模块Part(2)

    logging模块 hashlib模块 hashlib模块 Python的hashlib提供了常见的摘要算法,如MD5,SHA1等等. # 什么是摘要算法呢?摘要算法又称哈希算法.散列算法.它通过一个 ...

  4. ionic框架使用步骤

    nodejs下载:https://npm.taobao.org/mirrors/node一.全局安装ionic: npm install -g cordova ionic 如果安装失败: npm in ...

  5. like contains

    like :   %/%  = *****/**** contains:     abc    = 字符串中含有  abc

  6. 3、调试AngularJs

    1.获取Angular元素: angular.element(document.querySelector('html')); a.ele.scope()  提取它的$scope对象 b.ele.co ...

  7. 学号 20175223 《Java程序设计》第2周学习总结

    学号 20175223 <Java程序设计>第2周学习总结 教材学习内容总结 第二章要点: 要点1:标识符与关键字 要点2:基本数据类型:逻辑类型boolean,整数类型int|byte| ...

  8. yarn依赖管理工具的使用

    Yarn是Facebook发布的一款依赖管理工具,它比npm更快.更高效. 与NPM命令对照 npm install => yarn install npm install --save [pa ...

  9. Python pip源更改

    将pip源设置为阿里源 windows 打开文件资源管理器(文件夹地址中) 地址栏上面输入 %appdata% 在这里面新建一个文件夹pip 在pip文件夹里面新建一个文件叫做 pip.ini,内容如 ...

  10. [LeetCode&Python] Problem 925. Long Pressed Name

    Your friend is typing his name into a keyboard.  Sometimes, when typing a character c, the key might ...