Last active
October 23, 2025 07:59
-
-
Save dewomser/8b5e025d9a80df85743e87973e201da9 to your computer and use it in GitHub Desktop.
Github Backup . Alle Repositories klonen, Ordner zippen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # $GIST_TOKEN und mein_username muss angepasst werden ! | |
| datum="gitub_backup_$(date +%y_%m_%d_%H)" | |
| mkdir $HOME/$datum | |
| cd $HOME/$datum | |
| # die Curl-Zeile hann auch als 1-Zeiler benutzt weden. | |
| curl --header "Authorization: 'token' '$GIST_TOKEN'" -L "https://api.github.com/users/Dein_Username/repos?per_page=100&page=1" | jq '.[] .clone_url'|xargs -n1 -r git clone | |
| cd | |
| tar -czvf $datum.tar.gz $datum | |
| # rm -f -r $datum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$GIST_TOKEN und mein_username muss angepasst werden !