Restoring backup from older version

How to roperly restore dump from older version in recent version. I had version 1.22 something, probably 1.22.6. I did a dump using gitea dump command, then migrated to new server, but from what i can see now, sql file has a lot of create table, create index commands, which presumes that it should only be restore with same version.

So what is a proper way of restoring of backup from older version?

You have to restore to the same version when you dumped. And then upgrading to a new version.

It’s not possible when using TrueNAS apps. But I did restore sql file into 1.23.8. It still went through installation process, but then everything was there and working.