Gitlab 简明教程
GitLab - Create Backup
GitLab 允许通过使用简单命令来备份您的仓库。在本章中,我们将讨论如何在 GitLab 中执行备份 −
GitLab allows to take backup copy of your repository by using simple command. In this chapter, we will discuss about how to take backup copy in the GitLab −
Step 1 − 首先,使用 SSH(安全外壳)登录到你的 GitLab 服务器。
Step 1 − First, login to your GitLab server using SSH (Secure Shell).
Step 2 − 使用以下命令创建 GitLab 备份 −
Step 2 − Create the backup of GitLab by using the below command −
sudo gitlab-rake gitlab:backup:create

Step 3 − 您可以通过添加环境变量 SKIP 来从备份中排除一些目录,如下所示 −
Step 3 − You can exclude some directories from the backup by adding environment variable SKIP as shown below −
sudo gitlab-rake gitlab:backup:create SKIP = db,uploads

Step 4 − 备份 tar 文件将创建在默认的 /var/opt/gitlab/backups 目录中。导航到此路径并键入 ls -l 以查看所创建的备份文件 −
Step 4 − The backup tar file will get created in the default /var/opt/gitlab/backups directory. Navigate to this path and type ls -l to see the created backup file −
