I have two gitea instances running one locally and one remotely. I’d like to mirror local to remote in order to have an offsite backup.

Poking around I see in the admin/monitor page a list of running cron jobs one being “update mirrors” every 10 minutes. How does one implement that?? What/where is the code/script being run by that cron job?

I can find no documentation on the “feature”. I did find one other related post

There are github issues about mirroring from github and gitlab etc into gitea, but I’ve not yet seen anyone talk about automated mirroring of one gitea instance to another.
My personal use case is mirroring my main remote gitea instance repos to repos running on my home server. So far I’ve been setting up a mirror on the my home server manually for each new repo I create on the remote. But that’s tedious…and I’ve gotten a bit behind.
It looks like most of the required features already exist in…

Yes, you want to do the same thing as me
Currently you cant just point the local to the remote and have it magically mirror everything - which is what I was asking about in the other post.

What you can do is set up individual repositories as mirrors (of your remote gitea, github or wherever) and those mirrors will automatically be kept in sync, it’s those sync tasks you’re seeing in the admin/monitor section.

To set up a mirror add a new ‘migration’ and make sure you check the ‘migration type’ box to say it’s a mirror.

This is not something you do from an existing repo. You’re creating a new repo and setting it as a mirror.

So you have an existing remote repo. You log into the local gitea, click the the + button on the right side of the header and choose New migration. Within the form that shows there is a checkbox next to migration type.