Hi That might not work as we run gitlab-ctl. Find out the sizes of the repositories on the disk by du-h option and compare both the values using an excel sheet. If the values are same then data has restored properly, if the data on server is more than server 2 then the data is missing on ur new server, restore didn't work properly. *du -sh $(find /var/opt/gitlab/git-data/repositories -maxdepth 2 -mindepth 2 -type d -print) | sort -rh > /root/repo_lists_4112/4112_ListofRepos_omni_New.txt*
what we did to recover missing repos was. 1. compare new and old repo sizes and find which repos are missing data. 2. copy missing repos to new server repos folder. 3. now by doing step2 u will able to see files on UI but you cant commit data or use that repo, commits/pushes will be rejected. 4. fork from the existing repo on 2nd server and delete the old repo. 5. try cloning and pushing you will be able to do. Regards Ershad On Thursday, March 31, 2016 at 12:03:55 PM UTC+5:30, Raja Sekhar wrote: > > Hi Ershad, > > Thanks for quick response. > > If i take copy of GitLab file system /var/opt/GitLab/ & /opt/GitLab/ > whether this should work? > > > Regards, > Rajasekhar > > On Thu, Mar 31, 2016 at 11:30 AM, Ershad Ahmad <ers...@gmail.com > <javascript:>> wrote: > >> Hi >> >> This way has some problems. The master and other branches are not >> visible. The best way to do it to clone the repos that are missing to your >> local and then push them to server 2. You can try this method. >> >> Regards >> Ershad >> >> >> On Thursday, March 31, 2016 at 11:28:50 AM UTC+5:30, Raja Sekhar wrote: >>> >>> Hello Ershad, >>> >>> Thanks for replying. >>> >>> I have done like this. I took backup from server1 and restored in >>> server2. I have like so many repositories for that shall i do like this? >>> >>> Instead of taking of each and every repository, shall I copy >>> repositories directory from server1 to server2? >>> >>> >>> >>> Best Regards, >>> Rajasekhar >>> >>> On Thursday, March 31, 2016 at 1:27:22 AM UTC+5:30, Ershad Ahmad wrote: >>> >>>> Hi Raja Sekhar >>>> >>>> I have faced similar issue today. Since you want to migrate Gitlab from >>>> Server 1 to Server 2. >>>> ideally you should follow these steps. >>>> On Server 1. >>>> 1.Take backup >>>> On Server 2. >>>> 2.Install Gitlab >>>> 3.Restore the backup >>>> Note1: the versions of Gitlab on Server 1 and 2 should be same for the >>>> backup and restore to happen. >>>> Now coming to you problem. >>>> >>>> In repositories (/var/opt/gitlab/git-data/repositories/xyz.git/objects) >>>> u see only info/ & pack/ folders not hash files. >>>> The simple thing you can do to fix this is just copy those repositories >>>> from the server1 and paste them in the repos folder >>>> /var/opt/gitlab/git-data/repositories/. >>>> take a backup of existing repo(.git folder) (on server 2) before you >>>> copy the repo from server 1 to server 2 >>>> Now this will not work, you need to change the ownership of the copied >>>> xyz.git folder to git , then the data will show up in the web ui. here's >>>> the command >>>> $chown git:git -R xyz.git >>>> You can try this with one repo if results are positive you can continue >>>> with others. >>>> Note2: There should not be any new commits to the git repos you want to >>>> copy to, the changes will be lost since you are replacing the .git folder >>>> from server 1. >>>> >>>> Question : >>>> Now how will you find which repos has this problem. >>>> Answer: >>>> Note: In web UI u will see the size of the repo populating when you >>>> search projects but if you see inside the files wont be there. >>>> when you take a backup you can increase the window scroll so as to >>>> capture the log of the backup >>>> Save the log in one file grep out the SKIPPED directories, if the repos >>>> are blank/wiki they will be skipped, exclude them, the remaining repos >>>> might have this data missing problem. >>>> In the same way restore also capture the log of restore. >>>> exclude the blank repos the remaining repos you need to check if all >>>> the data is present or not. >>>> >>>> Gud Luck >>>> >>>> Regards >>>> Ershad <https://forum.gitlab.com/users/ershad.ahmad/> >>>> >>>> On Monday, March 28, 2016 at 8:56:39 AM UTC+5:30, Raja Sekhar wrote: >>>>> >>>>> Hello Magnus, >>>>> >>>>> Thanks for replying my post. >>>>> >>>>> While restoration of backup, it creates the repositories and inside >>>>> objects directories it shows only "info" and "pack" directories and am >>>>> not >>>>> able to see the secure hashes of all objects reference. >>>>> >>>>> >>>>> Best Regards, >>>>> Rajasekhar >>>>> >>>>> >>>>> On Wednesday, March 23, 2016 at 8:36:19 PM UTC+5:30, Magnus Therning >>>>> wrote: >>>>> >>>>>> >>>>>> Raja Sekhar <rajasek...@gmail.com> writes: >>>>>> >>>>>> > Hello All, >>>>>> > >>>>>> > I want to migrate GitLab from one server to another server(New >>>>>> One). How >>>>>> > can we achieve that? >>>>>> > >>>>>> > Can you please provide procedure to do that? >>>>>> >>>>>> I'm guessing a backup+restore should work: >>>>>> >>>>>> http://doc.gitlab.com/ce/raketasks/backup_restore.html >>>>>> >>>>>> /M >>>>>> >>>>>> -- >>>>>> Magnus Therning, magnus....@cipherstone.com >>>>>> Cipherstone Technologies AB >>>>>> Theres Svenssons gata 10, 417 55 Gothenburg, Sweden >>>>>> >>>>>> It is better to keep your mouth shut and appear stupid than to open >>>>>> it >>>>>> and remove all doubt. >>>>>> -- Mark Twain >>>>>> >>>>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "GitLab" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/gitlabhq/rDU1TalVG9s/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> gitlabhq+u...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/gitlabhq/10a1dc77-4d3f-4439-b9fa-ded09e813775%40googlegroups.com >> >> <https://groups.google.com/d/msgid/gitlabhq/10a1dc77-4d3f-4439-b9fa-ded09e813775%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Thanks & Regards,* > > *Rajasekhar.C* > *Mobile:+91-9620117336* > *E-Mail: rajasek...@gmail.com <javascript:>* > -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/edf241dc-dbbe-4072-b867-b17a17aaa49c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.