Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navytux/git-backup
Backup set of Git repositories & just files; efficiently. (mirror of https://lab.nexedi.com/kirr/git-backup)
https://github.com/navytux/git-backup
backup git gitlab
Last synced: about 2 months ago
JSON representation
Backup set of Git repositories & just files; efficiently. (mirror of https://lab.nexedi.com/kirr/git-backup)
- Host: GitHub
- URL: https://github.com/navytux/git-backup
- Owner: navytux
- License: other
- Created: 2018-05-25T09:23:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T14:11:29.000Z (7 months ago)
- Last Synced: 2024-10-14T13:16:30.058Z (3 months ago)
- Topics: backup, git, gitlab
- Language: Go
- Homepage:
- Size: 187 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: COPYING
Awesome Lists containing this project
README
=======================================================================
Git-backup - Backup set of Git repositories & just files; efficiently
=======================================================================:author: Kirill Smelkov
:date: 2015 Aug 31This program backups files and set of bare Git repositories into one Git repository.
Files are copied to blobs and then added to tree under certain place, and for
Git repositories, all reachable objects are pulled in with maintaining index
which remembers reference -> sha1 for all pulled repositories.This allows to leverage Git's good data deduplication ability, especially for
cases when there are many hosted repositories which are forks of each other,
and for backup to have history and be otherwise managed as a usual Git
repository. In particular it is possible to use standard git pull/push to
synchronize backups in several places.Backup workflow is:
1. create backup repository::
$ mkdir backup
$ cd backup
$ git init # both bare and non-bare possible2. pull files and Git repositories into backup repository::
$ git-backup pull dir1:prefix1 dir2:prefix2 ...
This will pull bare Git repositories & just files from `dir1` into backup
under `prefix1`, from `dir2` into backup prefix `prefix2`, etc...3. restore files and Git repositories from backup::
$ git-backup restore prefix1:dir1
Restore Git repositories & just files from backup `prefix1` into `dir1`,
from backup `prefix2` into `dir2`, etc...Backup state to restore is taken from which is sha1 or
ref pointing to backup repository state.4. backup repository itself can be managed with Git. In particular it can be
synchronized between several places with standard git pull/push, be
repacked, etc::$ git push ...
$ git pull ...Please see `git-backup.go`__ source with technical overview on how it works.
We also provide convenience program to pull/restore backup data for a GitLab
instance into/from git-backup managed repository. See `contrib/gitlab-backup`__
for details.__ git-backup.go
__ contrib/gitlab-backup