How to handle backups, only database?


I am new in git and gogs. I installed already git and gogs on a machine with MSSQL Server and I use this from Visual Studio as remote repositories. Everything runs as expected and I like it to work with git and gogs, it’s fine!

My question is how to handle backups? The MSSQL Server runs automatically backups every night. Are this backup enough so save my repositories or is it necessary to use “./gogs -backup” to save the gogs-repositores directory too?

I look forward to your advices!

Kind regards


Generally, you would want to tar your gogs-repositores directory yourself because it should be large, besides database and gogs-repositores directory, you also need to backup custom and data directories (which also included in gogs backup command).

Ref: How to backup, restore and migrate

Thanks a lot for your information!

Now I like to run this by a batch file (*.bat) and task scheduler. But how do I set the target folder in a batch file?

c:\test\gogs.exe backup

This doesn’t place the zip file next to the exe file or else where.

Reference: How to backup, restore and migrate