• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Create Backup and Restore in Gitlab-CE 14.4.2 on Oracle Linux 8.5

  • 00:43 cat /etc/os-release
  • 01:00 gitlab-rake gitlab:backup:create
  • 01:20 cd /var/opt/gitlab/backups/
  • 01:55 gitlab-rake gitlab:backup:create SKIP = db,uploads
  • 03:12 gitlab-rake gitlab:backup:restoreBACKUP=1654733800_2022_06_09_14.4.2
  • 04:15 gitlab-rake gitlab:check SANITIZE=true
{{postValue.id}}

To Create Backup and Restore in GitLab-CE 14.4.2 on Oracle Linux 8.5

Introduction

GitLab provides Rake tasks for backing up and restoring GitLab instances. An application data backup creates an archive file that contains the database, all repositories and all attachments. You can only restore a backup to exactly the same version of GitLab on which it was created.

Installation Procedure:

Step1: Check the OS version by using the below command

[root@linuxhelp ]# cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="8.5"
ID="ol"

Step 2: To take the complete backup use the below command

[root@linuxhelp ~]# gitlab-rake gitlab:backup:create 
Dumping database ... 
[SKIPPED]
Dumping repositories ...
.
.
.
done
done
Deleting old backups ... skipping

Step 3: To skip some fields and take backup use the below command.

[root@linuxhelp ~]# gitlab-rake gitlab:backup:create  SKIP = db,uploads
Dumping database ... 
[SKIPPED]
Dumping repositories ...
.
.
.
done
done
Deleting old backups ... skipping

Step 4: To View the backup location use the below command

[root@linuxhelp ]# cd /var/opt/gitlab/backups/
[root@linuxhelp backups]# ls
1654733800_2022_06_09_14.4.2_gitlab_backup.tar

Step 5: After creating backup, Delete the user in the group on GitLab as shown in the below images snap1

snap2

Step 6: Restore the backup by running the below command.

[root@ linuxhelp~]# gitlab-rake gitlab:backup:restoreBACKUP=1654733800_2022_06_09_14.4.2
2022-06-09 05:50:01 +0530 -- Restoring lfs objects ... 
2022-06-09 05:50:01 +0530 -- done
This task will now rebuild the authorized_keys file.
You will lose any data stored in the authorized_keys file.
Do you want to continue (yes/no)? yes

Step 7: To check configuration status of GitLab use the below command.

[root@linuxhelp~]# gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version > = 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
.
.
.
Your git bin path is " /opt/gitlab/embedded/bin/git" 
Git version > = 2.7.3 ? ... yes (2.10.2)
Active users: 1
Checking GitLab ... Finished

Step 8: Now Login to GitLab and check whether the deleted user is restored as shown in the below image snap 3

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Create Backup and Restore in GitLab-CE 14.4.2 on Oracle Linux 8.5 . Your feedback is much welcome.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How does GitLab backup work?

A

An application data backup creates an archive file that contains the database, all repositories, and all attachments.

Q

Can we recover deleted branch in GitLab?

A

GitLab has not implemented this feature at the time of this writing.

Q

Where are GitLab issues stored?

A

The uploads are stored by default in /home/git/gitlab/public/uploads.

Q

How much RAM does GitLab use?

A

You need at least 2GB of addressable memory (RAM + swap) to install and use GitLab.

Q

Does GitLab need a database?

A

GitLab supports only the PostgreSQL database management system.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.