Search and you'll find various software doing it. If you just want a minimal shell thing for repos themselves, you can fetch a list from GH API for user X and clone them into destination `/home/X/repos` like so:
The source code itself is just Git, so you can 'git clone' it anywhere. Add that host to your origin(s) and just push it as you always do.
However, other data such as tickets, PR history, gists, etc. will be a lot harder to keep in sync with another service. GH allows exporting all the data, per GDPR, but importing it somewhere else will probably not be possible.
Is there some easy way to mirror everything on GH to a NAS or something?