So logs rotate in around 30 minutes rn,
binlog_space_limit is not dynamic
and I really would like to avoid server restart.
What are my options in setting up a replica?
Can I archive binlogs and implant them on a new server
or maybe set up an instance with Slave_IO running,
then implant a dataset and point it to required gtid later?
You can set the binlog expire and rotate by using this setting. binlog_expire_logs_secounds=, you could set this to like = 432000 which is 5 days.
As I stated earlier binlog_space_limit variable is set,
so binlog_expire_logs_seconds won’t help.
So you have a space issue, and you want to keep more logs in a different location and have the replica read from there?
No, I’m not constrained by space, but logs rotate faster than full backup could be made.
If I could restart mysql it’d solve the issue, but i’m trying to avoid restart.
Yes. You can use the
mysqlbinlog tool as a dummy replica on your new host to connect to the source to save all binlogs to the new host. After you restore the backup on replica, you can replay all the binlogs up to current, then switch over to using replication protocol.