git 备份和恢复
分类: 项目管理
下载安装包wget https://downloads.bitnami.com/files/stacks/gitlab/7.11.4-0/bitnami-gitlab-7.11.4-0-linux-x64-installer.run
然后更改成执行权限:chmod a+x bitnami-gitlab-7.11.4-0-linux-x64-installer.run
再执行安装:./bitnami-gitlab-7.11.4-0-linux-x64-installer.run
按照提示安装输入Y/N安装:
点击(此处)折叠或打开
- [root@wb-2 ~]# ./bitnami-gitlab-7.11.4-0-linux-x64-installer.run
- The installer detects that exists a 'git' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y
- The installer detects that exists a 'gitlab_ci' user in the system. This installer will change the configuration for this user. Do you want to continue the installation? [y/N]: y
- ----------------------------------------------------------------------------
- Welcome to the Bitnami Gitlab Stack Setup Wizard.
- ----------------------------------------------------------------------------
- Select the components you want to install; clear the components you do not want
- to install. Click Next when you are ready to continue.
- PhpPgAdmin [Y/n] :Y
- GitLab : Y (Cannot be edited)
- GitLab CI [Y/n] :Y
- Is the selection above correct? [Y/n]: Y
- ----------------------------------------------------------------------------
- Installation folder
- Please, choose a folder to install Bitnami Gitlab Stack
- Select a folder [/opt/gitlab-7.11.4-0]: /opt/bitnami
- ----------------------------------------------------------------------------
- Create Admin account
- Bitnami Gitlab Stack admin user creation
- Email Address [user@example.com]: test@gmail.com
- Login [user]: test
- Password :
- Please confirm your password :
- ----------------------------------------------------------------------------
- Hostname that will be used to create internal URLs. If this value is incorrect,
- you may be unable to access your Gitlab installation from other computers. It is
- advisable to use a Domain instead of an IP address for compatibility with
- different browsers.
- Domain [127.0.0.1]: test.gitlab.com
- Do you want to configure mail support? [y/N]: N
- ----------------------------------------------------------------------------
- Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.
- Do you want to continue? [Y/n]: Y
- ----------------------------------------------------------------------------
- Please wait while Setup installs Bitnami Gitlab Stack on your computer.
- Installing
- 0% ______________ 50% ______________ 100%
- #########################################
- ----------------------------------------------------------------------------
- Setup has finished installing Bitnami Gitlab Stack on your computer.
- Info: To access the Bitnami Gitlab Stack, go to
- http://dev.domain.org:80 from your browser.
- Press [Enter] to continue:
上面红色标志的按照自己喜好设置了,如安装路径、admin用户等。
到此,整个安装结束,设置好HOST后访问test.gitlab.com就可以正常使用了。
备份以及恢复的操作,以下操作使用root用户执行:
点击(此处)折叠或打开
- ## Backup settings
- backup:
- path: "/tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
2、执行备份
点击(此处)折叠或打开
- cd /opt/gitlab-7.11.4-0/
- ./use_gitlab
- cd /opt/gitlab-7.11.4-0/apps/gitlab/htdocs
- bundle exec bin/rake gitlab:backup:create RAILS_ENV=production
操作执行完毕,会在/tmp/backups/目录下生产一个备份文件,类似1438917368_gitlab_backup.tar
3、恢复备份的数据
点击(此处)折叠或打开
- cd /opt/gitlab-7.11.4-0/
- ./use_gitlab
- cd /opt/gitlab-7.11.4-0/apps/gitlab/htdocs
- bundle exec bin/rake gitlab:backup:restore RAILS_ENV=production
- chown git:git -R /opt/gitlab-7.11.4-0/apps/gitlab/repositories
如果备份的目录下不止一个备份文件,则RAILS_ENV=production后面需要指定备份文件 BACKUP=xxx。
至此备份恢复完毕。
git 备份和恢复的更多相关文章
- MySQL没有备份怎么恢复被drop的表(利用undrop-for-innodb)
介绍: 也许大家都难以理解,这么重要的数据为啥不备份(或者备份不可用)?而且还任性的drop table了.显然有备份是最好的,但是它们并不总是可用的.这种情况令人恐惧,但并非毫无希望.在许多 ...
- GIT仓库如何恢复到前一次提交
GIT仓库如何恢复到前一次提交 通过使用Git版本恢复命令reset,可以回退版本.reset命令有3种方式: git reset –mixed:此为默认方式,不带任何参数的git reset,即 ...
- Gitlab备份和恢复操作记录
前面已经介绍了Gitlab环境部署记录,这里简单说下Gitlab的备份和恢复操作记录: 1)Gitlab的备份目录路径设置 [root@code-server ~]# vim /etc/gitlab/ ...
- 转载:Gitlab备份和恢复操作记录
转载:Gitlab备份和恢复操作记录 包含了备份和数据恢复的操作记录,实验可行 前面已经介绍了Gitlab环境部署记录,这里简单说下Gitlab的备份和恢复操作记录: 1)Gitlab的备份目录路径设 ...
- Gitlab+Jenkins学习之路(四)之gitlab备份和恢复
gitlab的备份和恢复 (1)创建备份目录,并授权 [root@linux-node1 ~]# mkdir /data/backups/gitlab -p [root@linux-node1 ~]# ...
- Git 将代码恢复到一个历史的版本
Git 将代码恢复到一个历史的版本 要把代码回到某个历史版本 比如 test有两种方法 暴力的方式 如果你的仓库是自己在用(不影响别人),那么你可以使用 git reset --hard <ta ...
- 【linux】【gitlab】gitlab安装、备份、恢复、升级、内存消耗问题
前言 GitLab:GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务.功能:Gitlab 是一个提供代码托管.提交审核和问题跟踪的代码管理平 ...
- Python进阶----pymysql的安装与使用,mysql数据库的备份和恢复,mysql的事务和锁
Python进阶----pymysql的安装与使用,mysql数据库的备份和恢复,mysql的事务和锁 一丶安装 pip install PyMySQL 二丶pymysql连接数据库 ### 语法: ...
- 我的MYSQL学习心得(十四) 备份和恢复
我的MYSQL学习心得(十四) 备份和恢复 我的MYSQL学习心得(一) 简单语法 我的MYSQL学习心得(二) 数据类型宽度 我的MYSQL学习心得(三) 查看字段长度 我的MYSQL学习心得(四) ...
随机推荐
- MySql中启用InnoDB数据引擎的方法
1.存储引擎是什么? Mysql中的数据用各种不同的技术存储在文件(或者内存)中.这些技术中的每一种技术都使用不同的存储机制.索引技巧.锁定水平并且最终提供广泛的不同的功能和能力.通过选择不同的技术, ...
- cookie的存值和取值方式
最近在开发中存储用户名信息,为了方便就使用了sessionStorage,但是写好才想到sessionStorage在IE下面是不支持的,所以无奈还是使用了cookie 那么接下来就谈谈怎么使用coo ...
- iOS设计模式之生成器
iOS设计模式之生成器 1.生成器模式的定义 (1): 将一个复杂的对象的构件与它的表示分离,使得相同的构建过程能够创建不同的表示 (2): 生成器模式除了客户之外还包括一个Director(指导者) ...
- git版本号管理工具的上手
git是一个分布式的版本号管理工具 和其它集中式版本号管理 工具相比具有下面长处: 1.能够在不联网的情况下开发 2.能够方便的建立本地分支 3.本地化的日志,高速获得信息 git命令的使用 mkdi ...
- strace
-c 统计每一系统调用的所执行的时间,次数和出错的次数等. -d 输出strace关于标准错误的调试信息. -f 跟踪由fork调用所产生的子进程. -ff 如果提供-o filename,则所有进程 ...
- Linux 的启动流程-阮一峰
http://www.ruanyifeng.com/blog/2013/08/linux_boot_process.html
- cocos2d-x之CCMotionStreak类——2013-08-25 16
在游戏的实现过程中,有时会需要在某个游戏对象上的运动轨迹上实现渐隐效果.这种感觉就好像是类似飞机拉线的拖尾巴,在视觉上感觉很好,比如子弹的运动轨迹等,如果不借助引擎的帮助,这种效果往往需要通过大量 ...
- 关于Bufferedreader的功能扩写
package cn.hncu.pattern.decorator.v1; import java.io.FileReader;import java.io.IOException; public c ...
- Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(一)
Spring更新到3.0之后,其MVC框架加入了一个非常不错的东西——那就是REST.它的开放式特性,与Spring的无缝集成,以及Spring框架的优秀表现,使得现在很多公司将其作为新的系统开发框架 ...
- iOS开发篇-申请开发者账号流程
1.注册一个苹果的apple id申请apple id的地址: https://appleid.apple.com/account 2.如申请公司账号,请使用以下链接免费获取邓白氏号码,以下的申请表格 ...