GitLab upgrade suggestion

Currently Gitlab running with version 12.4.2 and need to upgrade to latest stable ver 16.x
Have 15 repositories . jenkins ci/cd scripted(groovy) pipeline jobs leverage for each repo respectively.
2 Options am thnking.

  1. Upgrade existing system
    take backup
    upgarde relsase 12.x to 13.x, then 14.x till 16.x both gitlab and postgres related chagnes if any
    if any issues restore the backup or snapshot and try to fix
  2. Bring up latest ver of Gitlab new System
    a. Install Postgress supported ver and Gitlab 16x
    b. Wrapper script for api call for this steps to get data from old gitlab and restore in new gitlab
    b.1. Fetch user list and permission from old gitlab
    b.2. Restore users and set permission in new gitlab
    b.3. Create Tokens for all users
  3. Script or manul way to clone from Gitlab UI 15 repositories from old Gitlab.
    But not sure anything related to Postgress or other issues raises due to schema changes etc.

Since dirct upgrade is more complex and multiple version upgrade we may struck anytime is Postgress SQL Db and restore backupo snapshot and again try that…

Could anyone please suggest the best option is better?

With the level of GitLab experience/knowledge you seem to possess I would clearly recommend you take the upgrade route, that is guaranteed to get everything across.

You also don’t say how your installation was made, but if you used the omnibus packages e.g. postgres will be handled automatically - unless you’ve told it not to).

In any case you should look at

(if not the entire page)
to see which updates on the way you need.

If you just let any background migration complete chances are your upgrade will be smooth.