Update mirror cron job on admin/monitor page...how's that done?

I’m fairly new to gitea.

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

Yes, you want to do the same thing as me :slight_smile:
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.

hmmm. looking at a repo in ui I want to mirror I see no place to add a “migration” so not sure what you are referring to??

Alternatively I can set up a post-receive hook
here’s an issue where someone just set up a post-receive hook for each repo


the only question is how does one generate a token in gitea for command line git push authorization?

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.