How to find gitlab backup version?

I have a backup of an unknown version of gitlab. My partner assumes that he created gitlab version 6.0.2. But when I implement gitlab version 6.0.2, I still cannot restore it due to version mismatch. So, how do I get the exact gitlab backup version?

+4
source share
1 answer

Inside the tar archive there is a file named backup_information.yml. There is the information you are looking for. To find the version number:

tar xf 1411831804_gitlab_backup.tar -O backup_information.yml | grep gitlab_version | awk '{print $2}'

Where is the 1411831804_gitlab_backup.tararchive in question.

You can also make a simple script and navigate to the backup folder as follows:

for archive in $(find /home/git/gitlab/tmp/backups -name '*.tar'); do echo -ne "$archive - $(tar tf $archive backup_information.yml | grep gitlab_version | awk '{print $2}')\n"; done

Where /home/git/gitlab/tmp/backupsis the path to the backup directory. For Omnibus GitLab this is /var/opt/gitlab/backups.

, . , , . .

+7

All Articles