在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. 2、使用Angular-CLI初始化Angular项目(踩过的深坑!!!)

    1.step1:建一个放项目的文件夹,打开cmd,或vs code的终端,找到文件夹根目录 2.step2:初始化脚手架 初始化命令: ng new 项目名称 --skip-install 注意:-- ...

  2. kafka producer 发送消息简介

    kafka 的 topic 由 partition 组成,producer 会根据 key,选择一个 partition 发送消息,而 partition 有多个副本,副本有 leader 和 fol ...

  3. Go used as value问题

    练习Go变参时遇到一个报错:used as value 代码如下: // 错误代码 func myfunc(arg ...int) { for _, n := range arg { fmt.Prin ...

  4. 一、JAVA变量类型:②局部变量

    局部变量声明在方法.构造方法或者语句块中: public class Test{ public void pupAge(){ int age = 0; //定义age为方法pupAge中的局部变量,并 ...

  5. UVALive - 4223,hdu2962(简单dijkstra)

    Trucking Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  6. Linux下不停止服务,清空nohup.out文件

    转载:http://www.sucheasy.com/OracleFusionMiddleware/640.html 1.nohup.out的由来及作用 用途:LINUX命令用法,不挂断地运行命令. ...

  7. yuan的第二次随笔

    第一题: 计算两数的和与差 设计思路: 1:看题目:主函数与函数声明,知道它要你干什么 2:理解与分析:在main中,定义两个实数a,b;要你求两数的和与差 3:解答:通过调用函数sum_diff,指 ...

  8. C语言如何在可变参数函数中使用printf?

    我要将printf外面再包上一层:void fun(const char* fmt,...) {........printf(fmt,...);........}这种函数怎么写? 对比下printf与 ...

  9. 网络编程-----IO

    IO模型介绍 阻塞IO 非阻塞 多路复用 异步 IO模型比较分析 selectors 阻塞IO:之前写的所有的socket,recv,accput都是 阻塞原理: 其实多数时间多用到了等待数据那里. ...

  10. 我的代码-cleaning

    # coding: utf-8 # In[18]: import pandas as pdimport numpy as npfrom sklearn import treefrom sklearn. ...