Even if the repo is on a client-only machine with a single user, then the user still may commit something during an automated backup run :(.May not be easy - or even possible - to deny all accesses, e.g.Mirrors can be used as a basis for a full file backup script.Ī cold-copy backup can always do a full file backup: deny all accesses to the git repos, do backup and allow accesses again.Supports hardlinks for mirrors on same file system to avoid wasting space.Primary intention of this command is to build a full active mirror, that periodically fetches updates from the original repository.docs: man git-clone, man git-fsck, What's the difference between git clone -mirror and git clone -bare.Bundles are dump files and can be directly used with git (verify, clone, etc.).Put backup into a single archive file or use directory structure?.Does the file system support hardlinks?.How to verify that a backup is not corrupted after creation or over time?.Is an incremental approach wanted? How many generations will be stored and when to create a full backup again?.Is there enough space to hold the full backups? How many generations will be stored?.On-going changes do not affect that state. Service provides a fixed state for backup purposes.Stop the service to have exclusive access to its files.Git is a developer tool and leaves this to the admin.īackup of the git configuration and OS configuration should be seen as separated from the backup of the content. Optional: OS configuration (file system permissions, etc.).git/info/ (repository exclude file, etc.) post-receive-email hook, gitolite, GitWeb, etc.) git/description (for hooks and tools, e.g. Special case "packfile": git combines and compacts objects into packfiles during garbage collection (see git gc).Git is a developer tool and supports this point of view via git clone -mirror and git bundle -all. The point of view differs on what a "100%" backup is. Environment is a git server on a Linux machine with a file system that supports hardlinks.even the configuration of the original machine may have changed since the backup. Additionally a script should do the restore to adapt the dump to the target machine, e.g.A script should do the backup to combine the multiple steps for a single backup and to avoid human mistakes (typos, etc.).Shortcomings of git will be worked around by additional commands.Backup via a "hot-copy" is preferred to avoid service downtime.Then enriching it with the typical wishes and specifiying some presettings: Goal is to get as close as possible to a "full" backup of a git repository.So starting with picking-up the original question: Therefore sharing my thoughts here to help others and put them up for discussions to enhance them. I think it still lacks some hints, information or conclusion to find the "correct way" (tm) for oneself. This thread was very helpful to get some insights how backups of git repos could be done.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |