gitbbak
v0.0.2
Published
This is a simple command line tool designed to provide incremental backups for git using git bundle. I wrote this as a potential alternative to sharing bare repositories across tools such greyhole or cloud file sharing solutions such as dropbox due to t
Downloads
2
Readme
Git bundle backup CLI
gitbbak
This is a simple command line tool designed to provide incremental backups for git using git bundle. I wrote this as a potential alternative to sharing bare repositories across tools such greyhole or cloud file sharing solutions such as dropbox due to their potential shortcomings with consistency etc. Each bundle file generated by git is an immutable set of deltas, and thus can be shared easily as 1 entity.
This is an early prototype and is not a robust backup solution. Use at your own risk.
To install:
> npm install gitbbak -g
In order to create an incremental backup:
> git init
> git add -A
> git commit -m "new"
> gitbbak
If you wish to specifiy a output target directory for the bundle files, you can provide a -t or --target parameters:
> gitbbak -t path\to\your\backupfolder
You can then restore these to another repository:
> git init
> gitbbak restore -t path\to\your\backupfolder
Restore will execute the backups in order of oldest to newest. It is important that they are executed in this order as incremental backups only have deltas between two points, and not the entire history.
files to ignore
You may wish to gitignore any .bundle files if you are not using an external target directory.
Technical details
How is metadata stored?
All metadata is stored in the tag names. This consists of a date and a backup prefix. So far this is all that is needed.
What happens if i loose a bundle file?
You will not be able to reconstruct your repository. All files must be present to rebuild.