Postgres replica out of sync

we have a postgres 9.6 replica configured among 2 servers. We used the following configuration to create the replica:

postgresql.conf  wal_level = hot_standby                         max_wal_senders = 5 wal_keep_segments = 32 archive_mode = on    archive_command = 'cp %p /archive/%f' 

The problem is that the servers has been restarted due to some maintenance tasks and now they are out of sync.

Since the DB is very large, how can we restore the replica and then synchronize the data without having the application down more then 5/10 minutes? Can it be done in background while the application on the master site is being used?