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

Backup #24

Open
alecandido opened this issue Mar 8, 2024 · 0 comments
Open

Backup #24

alecandido opened this issue Mar 8, 2024 · 0 comments
Labels
server Server services and configs

Comments

@alecandido
Copy link
Owner

alecandido commented Mar 8, 2024

Track my user and few orgs (i.e. qiboteam, qibogang, and nnpdf).
Possibly even subset of some orgs (I don't care about having a backup of pineapplgrids or reportengine).

Schedule daily uploads.
Keep shallow.

Periodically (monthly?) copy the full snapshot to a different location.

Code

Make a backup flake in alecandido/flakes (Python, there is JSON and TOML support built-in).

Keep the systemd unit in alecandido/nixpkgs?

  • git: shallow clone (it automatically uses the SSH key, but I don't need the history)
    • optionally mark some repos as full clones
  • scp, obvious (no history)
  • http, curl resource to folder identified by group name

Config file

Specify which repos (or sets) to download:

[scp]
villarose = ["~/path/to/folder1", "~/path/to/folder2", "..."]
yukon = ["~/path/to/folder3", "~/path/to/folder4", "..."]
"..." = ["..."]

[http]
group1 = ["..."]

[git.github]
owners = ["alecandido", "qiboteam", "qibogang"]
repos = ["nnpdf/eko", "nnpdf/yadism", "nnpdf/pineappl", "..."]

[git.gitlab]
"..." = ["..."]

Keep different sources separate, because of addressing (but also because they may have different APIs).

GitHub

gh api /user/repos --jq '.[] | {"name": .name, "owner": .owner.login, "url": .ssh_url}' --paginate
@alecandido alecandido added the server Server services and configs label Mar 8, 2024
@alecandido alecandido changed the title Clone all GitHub repos Backup Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Server services and configs
Projects
None yet
Development

No branches or pull requests

1 participant