A bash script to migrate all private/public repositories under an organization, and download archives in a single go, for restoring on to github enterprise or github.com. Backups are downloaded and placed in working directory. Github access token required as owner of the organization.
Available commands - backup, download, status, delete and help.
v0.2 - backup, download and status checks with instructions.
v0.3 - add delete archive option.
- Github Access Token generated as owner of the organization.
- curl
git clone git@github.com:adfolks/scripts.git
cd scripts
chmod +x ./github-migrator
./github-migrator --help
Edit github-migrator and add access token, organization name, and username. Provide execute permission and call the script from working directory.
Available commands are backup, download, status and help. Avoid running backup more than once as it creates seperate intances of backup on server side.
./github-migrator --help
./github-migrator --backup
Note: Do not run 'backup' more than once to avoid duplicates.
./github-migrator --status
./github-migrator --download
./github-migrator --delete
This will delete all current backup migration archives from github.com end, useful to clean up after download, or to start anew. Repositories can still show as exported but without archive urls while running --status. Alternately migration archives are automatically deleted after seven days.
- Add restore commands.
- Add clean up of archives on github end after backups. #done
- Accept token and username as arguments.