LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-10-2011, 10:33 AM   #1
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
git copy of data to another server


Hello,

I've built my first git server. I need to copy the repositories from the old git server to the new, how do I do this?

I've seen several questions about exporting or importing git data to other systems like svn but not on making a copy from one git server to another.

We are moving from a bare metal system to VMs. I've built the VM and installed git on it. I now need to move the data from the old server to the new VM. Once I've confirmed that the developers can use the new repositories I can wipe the old, but I need the both to work side by side until I can confirm the new server is working.

This is on a RHEL 5.5 OS.

Thank you
 
Old 10-10-2011, 10:54 AM   #2
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
I think I found something close to what I need, the following seems to kinda/sorta work:

Quote:
git clone machine:/path_to_repository
I did the first one as root so it wound up being owned by root. I did the next one as the gitosis user and so it wound up being owned by the gitosis user, which is what I want. Can I simply do a chown on the first one to the gitosis user or will that bother git? Would it be better to properly delete it through git and then re-clone it?
 
Old 10-10-2011, 01:35 PM   #3
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
can I just tar up a group of repositories and copy them to the 2nd server and untar them?
 
Old 10-10-2011, 03:32 PM   #4
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Original Poster
Rep: Reputation: 32
apparently the first command to clone my repositories was not sufficient. When I try to run the command
Quote:
git clone -v gitosis@host:repository /my_repo
I get
Quote:
ssh: connect to host port 22: Bad file number
which means that it can't find the git repository

I have gitosis home set to /git
I have a dir /git/repositories
I ran the clone command in the dir /git/repositories and have the dir /git/repositories/scripts
difference between cloned copy and orig is under the dir. /git/repositories/scripts are dirs like branches, hooks and files like config, description, and HEAD
In the cloned dirs those files and dirs are one dir deeper in /git/repositories/scripts/.git

Does anyone have any ideas on why I cannot remotely get to the files from the new system?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
data copy from mysql to samba server Zafermalik Linux - Server 5 07-18-2011 04:06 PM
unable to copy data to remote server using ncftp command ckiran04 Linux - Server 5 07-17-2011 08:41 AM
Cloning git repositories by copy drkdick Linux - Software 2 11-12-2010 10:20 AM
copy xfs data fromr one serveur to other server cormanstnl Linux - Server 2 02-05-2008 05:09 AM
copy data from Linux server to another PC B-Boy Linux - Newbie 1 01-21-2008 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration