Skip to content

Recursively backup all your git repositories using one command (powered by git bundles)

License

Notifications You must be signed in to change notification settings

dchapkine/backup-git-repository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Backup GIT Repos

Recursively backup all your git repos using a single command

USAGE


USAGE: ./backup-git.sh -i SRC_DIR -o DST_DIR -m MODE
  -i: directory path, where to look for git repositoies to backup
  -o: directory path, where to store backups
  -m: output mode: recursive 'tree', or 'flat' named backups all in one folder

EXAMPLE 1: backup

./backup-git.sh -i ~/git -o ~/tmp -m flat

Will recursively backup all git repos in ~/git into ~/tmp, using flat structure

EXAMPLE 2: dry run

./backup-git.sh -i ~/git -o ~/tmp -m tree --dry yes

EXAMPLE 3: dry run trick

./backup-git.sh -i ~/git -o ~/tmp -m tree --dry yes > real_backup.sh

what's cool about dry run, is that you can actualy save the output as script, to run it later

About

Recursively backup all your git repositories using one command (powered by git bundles)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages