Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--all-starred does not backup anything #225

Open
andry81 opened this issue Dec 4, 2023 · 7 comments
Open

--all-starred does not backup anything #225

andry81 opened this issue Dec 4, 2023 · 7 comments

Comments

@andry81
Copy link

andry81 commented Dec 4, 2023

The --starred backups a not empty list. But the --all-starred does nothing.

@josegonzalez
Copy link
Owner

Pull requests welcome.

@whwright
Copy link
Contributor

What full command are you using and what is the expected behavior? This is probably due to a strange combination of command line arguments - and I will admit they are not as intuitive as they could be as features have been incrementally added.

I saw the described behavior with github-backup -t ${T} --starred --all-starred -o output/ whwright, however it does work if you include either --repositories or --all. This is because backing up any repository is gated behind those flags:

if (args.include_repository or args.include_everything) or (

@andry81
Copy link
Author

andry81 commented Jun 3, 2024

@whwright I retested the latest and the result is the same. It does backup only the RestAPI response. And does not attempt to git clone anything.

Log:

>"c:/python/x64/312/python.exe" "c:/Python/x64/312/Scripts/github-backup" --starred --all-starred --bare -t ghp_* -o "w:\work\MyProjects\!__backup\store\github.com/2024'06'03_23'00'13''543.backup-all-starred/starred/andry81" "andry81"
2024-06-03T23:00:13.749: Create output directory W:\work\MyProjects\!__backup\store\github.com\2024'06'03_23'00'13''543.backup-all-starred\starred\andry81
2024-06-03T23:00:13.750: Backing up user andry81 to W:\work\MyProjects\!__backup\store\github.com\2024'06'03_23'00'13''543.backup-all-starred\starred\andry81
2024-06-03T23:00:13.750: Requesting https://api.github.com/user?per_page=100&page=1
2024-06-03T23:00:14.065: Retrieving repositories
2024-06-03T23:00:14.065: Requesting https://api.github.com/user/repos?per_page=100&page=1
2024-06-03T23:00:15.865: Requesting https://api.github.com/user/repos?per_page=100&page=2
2024-06-03T23:00:19.656: Requesting https://api.github.com/user/repos?per_page=100&page=3
2024-06-03T23:00:21.605: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=1
2024-06-03T23:00:23.826: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=2
2024-06-03T23:00:26.134: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=3
2024-06-03T23:00:29.260: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=4
2024-06-03T23:00:31.604: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=5
2024-06-03T23:00:33.243: Filtering repositories
2024-06-03T23:00:33.244: Backing up repositories
2024-06-03T23:00:33.250: Retrieving andry81 starred repositories
2024-06-03T23:00:33.250: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=1
2024-06-03T23:00:35.637: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=2
2024-06-03T23:00:38.259: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=3
2024-06-03T23:00:40.393: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=4
2024-06-03T23:00:42.673: Requesting https://api.github.com/users/andry81/starred?per_page=100&page=5
2024-06-03T23:00:44.103: Writing 444 starred repositories to disk

After that only the JSON file is existing:

w:\work\MyProjects!__backup\store\github.com\2024'06'03_23'00'13''543.backup-all-starred\starred\andry81\account\starred.json

Is that supposed to work like this?

@whwright
Copy link
Contributor

whwright commented Jun 3, 2024

@andry81 as stated above I believe this will work if you include --repositories or --all

@andry81
Copy link
Author

andry81 commented Jun 3, 2024

Seems https://*****:[email protected]/ url prefix saves in the bare repository config which is not secure I think.

@andry81
Copy link
Author

andry81 commented Jun 3, 2024

I've added --repositories and it backups both the starred AND mine repositories. I don't won't to backup mine, I want to backup starred only. Is there a way?

@whwright
Copy link
Contributor

Yeah that's true, I think it would be a reasonable change to backup starred repos with only --all-starred. That would be an easy change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants