Canonical site A into site B

Hello,

At this moment there are 2 installation sites (mirror site) which we going to merge, the problem is we can’t do that now. At least until August

Site A is built first and its the one that receives traffic
Site B is the brand domain that we trying to

site A dan site B basically is having the same content, layout, URL etc…we can do 301 redirects from site A to B but as I said earlier we cant do redirect now

I’m thinking of using temporary canonical meta tags on-site A pointing to site B until august so the search engine saw canonical tags and dropping search results at site A, and indexing site B URL instead (maybe using hardcoded PHP in header)

<link rel=:canonical: href="https://site-B.com" />

is this method an appropriate step to achieve what I wanted to? if so how do I catch journals path in URL so between site A and B have the same canonical
<link rel=:canonical: href="https://site-B.com/journals/Viewarticle/123" />

Open Journal Systems 3.0.2.0

my apologies for my English