How to sort out a buggy migration between major jenkins upgrades?

I have a Jenkins installation (Version 2.346.3) with several pipelines, configurations, users, and keys. However, since it is outdated I can’t seem to install Sonarqube on it.
I am trying to get another updated installation of Jenkins (2.452.2) and then copy the /var/lib/jenkins directory so that everything can be migrated but when I do that, even though all the pipelines are retained, I also see errors such as not being able to update the pipelines already there or failed installation of libraries such as sonarqube.

In the manage section, these are the following warnings I get.

The following installed plugins are deprecated
JavaScript GUI Lib: Handlebars bundle plugin
JavaScript GUI Lib: ACE Editor bundle plugin
WMI Windows Agents Plugin
Popper.js 2 API Plugin
JavaScript GUI Lib: Moment.js bundle plugin
In general, this means that these plugins are either obsolete, no longer being developed, or may no longer work.
See the linked web pages for further information about the cause for the deprecation, and suggestions on how to proceed.

Correct
Some plugins could not be loaded due to unsatisfied dependencies. Fix these issues and restart Jenkins to re-enable these plugins.

Dependency errors:

Mina SSHD API :: Core (2.12.1-101.v85b_e08b_780dd)
Update required: SSH Credentials Plugin (ssh-credentials 305.v8f4381501156) to be updated to 326.v7fcb_a_ef6194b_ or higher
Matrix Authorization Strategy Plugin (3.2.2)
Update required: Folders Plugin (cloudbees-folder 6.740.ve4f4ffa_dea_54) to be updated to 6.815.v0dd5a_cb_40e0e or higher
Some of the above failures also result in additional indirectly dependent plugins not being able to load.

Indirectly dependent plugins:

SSH server (3.322.v159e91f6a_550)
Failed to load: Mina SSHD API :: Core (mina-sshd-api-core 2.12.1-101.v85b_e08b_780dd)
More Info
Dismiss
It appears that your reverse proxy set up is broken.
Go to plugin manager
Configure which of these warnings are shown
Warnings have been published for the following currently installed components:
Bitbucket Branch Source Plugin 791.vb_eea_a_476405b
Bitbucket OAuth access token exposed in the build log
Incorrect trust policy behavior for pull requests from forks
Fixes for all of these issues are available. Go to the plugin manager to update the plugin.
Job Import Plugin 3.5
Missing permission check allows enumerating credentials IDs
A fix for this issue is available. Go to the plugin manager to update the plugin.
Email Extension Plugin 2.91
Stored XSS vulnerability in custom email templates
XSS vulnerability in bundled email templates
Script Security sandbox bypass vulnerability
CSRF vulnerability
Missing permission check
Fixes for all of these issues are available. Go to the plugin manager to update the plugin.
Pipeline: Groovy Libraries 612.v84da_9c54906d
Sandbox bypass vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.
HTML Publisher plugin 1.30
Path traversal vulnerability
Improper input sanitization
Stored XSS vulnerability
Fixes for all of these issues are available. Go to the plugin manager to update the plugin.
Folders Plugin 6.740.ve4f4ffa_dea_54
CSRF vulnerability
CSRF vulnerability may approve unsandboxed scripts
Information disclosure
Fixes for all of these issues are available. Go to the plugin manager to update the plugin.
Pipeline: Input Step 449.v77f0e8b_845c4
CSRF protection for any URL can be bypassed
A fix for this issue is available. Go to the plugin manager to update the plugin.
Pipeline: Groovy 2759.v87459c4eea_ca_
Sandbox bypass vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.
Pipeline: Job 1207.ve6191ff089f8
Stored XSS vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.
GitHub plugin 1.34.5
Stored XSS vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.
Pipeline: Build Step 2.18
Stored XSS vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.
Pipeline: Stage View Plugin 2.24
CSRF protection for any URL can be bypassed
A fix for this issue is available. Go to the plugin manager to update the plugin.
Plain Credentials Plugin 139.ved2b_9cf7587b
Secret file credentials stored unencrypted in rare cases
A fix for this issue is available. Go to the plugin manager to update the plugin.
Structs Plugin 337.v1b_04ea_4df7c8
Exposure of secrets through system log
A fix for this issue is available. Go to the plugin manager to update the plugin.
LDAP Plugin 2.12
CSRF vulnerability
A fix for this issue is available. Go to the plugin manager to update the plugin.

While trying to update pipelines, this is the error I get JSONObject["gitUser"] is not a JSONObject.

Ideally, what is the best way of migrating in such cases?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật