add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
39
old_snippets/git-repo-backup.en.md
Normal file
39
old_snippets/git-repo-backup.en.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "git repo backup"
|
||||
date: 2020-02-23T10:14:44+01:00
|
||||
draft: false
|
||||
snippet_types: ["git", "pass"]
|
||||
---
|
||||
|
||||
|
||||
Backup a git repo without thats not hosted on remote repo with:
|
||||
|
||||
```shell
|
||||
$ git bundle create /tmp/pass_"$(date +%s)".bundle --all
|
||||
|
||||
```
|
||||
|
||||
Then to confirm bundle:
|
||||
|
||||
```shell
|
||||
$ git bundle verify /tmp/pass_1582448923.bundle
|
||||
```
|
||||
|
||||
When you need to restore the backup into a new repo folder:
|
||||
|
||||
```shell
|
||||
$ git clone -b master /tmp/pass_1582448923.bundle newrepo
|
||||
```
|
||||
|
||||
I recently used this to backup my *~/.pass-store* [pass](https://www.passwordstore.org/)
|
||||
repo. Basically it's a folder full of **.gpg** files each encrypting a password. Don't want to store
|
||||
it on a remote host so I back it up locally. Create a git bundle then I encrypt the resulting bundle
|
||||
file and store it somewhere safe.
|
||||
|
||||
```shell
|
||||
$ gpg --symmetric ./pass_1582448923.bundle
|
||||
```
|
||||
|
||||
source:
|
||||
|
||||
[git-memo docs](https://git-memo.readthedocs.io/en/latest/repository_backup.html)
|
||||
Loading…
Add table
Add a link
Reference in a new issue