Skip to content

--all-starred does not backup anything #225

Closed

Description

@andry81

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

Activity

  1. josegonzalez commented on Jan 29, 2024

    @josegonzalez
    Owner

    Pull requests welcome.

  2. whwright commented on Jan 31, 2024

    @whwright
    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 (

  3. andry81 commented on Jun 3, 2024

    @andry81
    Author

    @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?

  4. whwright commented on Jun 3, 2024

    @whwright
    Contributor

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

  5. andry81 commented on Jun 3, 2024

    @andry81
    Author

    Seems https://*****:x-oauth-basic@github.com/ url prefix saves in the bare repository config which is not secure I think.

  6. andry81 commented on Jun 3, 2024

    @andry81
    Author

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

  7. whwright commented on Jun 14, 2024

    @whwright
    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.

  8. Iamrodos commented on Dec 7, 2025

    @Iamrodos
    Contributor

    @josegonzalez this can be closed. Addressed by 6e2a7e5 in PR #461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions