From: Dennis Putnam <dap1@bellsouth.net>
To: git@vger.kernel.org
Subject: Re: Migrating Repository without Network
Date: Wed, 22 Oct 2025 11:29:08 -0400 [thread overview]
Message-ID: <16b5dc64-201e-4796-942e-1e6e2f386ce8@bellsouth.net> (raw)
In-Reply-To: <6tygbwc6ifpuo3xylsmsveufqyroazy35u4lyblnvuls3l7n3u@d4ail3s6vtoa>
[-- Attachment #1.1: Type: text/plain, Size: 2251 bytes --]
Thanks for the reply. I'm not a git expert (obviously) so I am not sure
of some of the terminology. This is a remote repository that is accessed
via SSH from various clients. Does that clarify things?
On 10/22/2025 5:04 AM, Konstantin Khomoutov wrote:
> On Tue, Oct 21, 2025 at 10:21:52AM -0400, Dennis Putnam wrote:
>
>> I have a server with a git repository whose NIC is no longer working. I need
>> to migrate that repository to a new server using a flash drive. I can only
>> find instructions for migrating when both servers have network access. Can
>> someone tell me how to do a migration without using a network? TIA.
> Note that Git repositories - both "bare" which are typical for servers [1] -
> and "normal" - which usually get created when the folks clone repositories
> from centralized locations, are self-containing, so what you should do is to
> just physcally copy the directory with the repository to the flash drive,
> recursively. Then make sure you have another copy of it, just in case you'll
> screw something later.
>
> Then, once you have the repository on the flash drive, what to do heavily
> depends on how the access to that repository was provided - simply because
> there are many ways to do that - say, via SSH with several real system
> accounts, via SSH with a single "virtual" user, via HTTP[S] with the
> authentication provided by the mediating web server, and so on; it is also
> possible to combine these ways of access. It is also possible that the repo
> is under the control of some turn-key solution such as GitLab, Gitea etc.
> So, in the end, what to do next depends on what setup *around* that Git repo
> you have right now.
>
> In either case, it will be possible to fetch all the data from the repo saved
> on the flash drive: it might be not exactly obvious but all Git commands which
> fetch data - such as "clone", "fetch" etc - do understand "plain" pathnames
> such as /the/path/to/the/repo and URLs with the special scheme "file://" -
> such as file:///the/path/to/the/repo, allowing them to work with on-disk repos
> available locally such as on a mounted flash drive.
>
> 1. https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
prev parent reply other threads:[~2025-10-22 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94497aac-c61a-4b17-9e4c-8ca9b966829c.ref@bellsouth.net>
2025-10-21 14:21 ` Migrating Repository without Network Dennis Putnam
2025-10-21 21:23 ` D. Ben Knoble
2025-10-21 22:23 ` Junio C Hamano
2025-10-22 9:04 ` Konstantin Khomoutov
2025-10-22 9:14 ` Konstantin Khomoutov
2025-10-22 15:29 ` Dennis Putnam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16b5dc64-201e-4796-942e-1e6e2f386ce8@bellsouth.net \
--to=dap1@bellsouth.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).