Need to set up replica while binlog_space_limit is too small on master

Hi.
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?

1 Like

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.

1 Like

As I stated earlier binlog_space_limit variable is set,
so binlog_expire_logs_seconds won’t help.

1 Like

So you have a space issue, and you want to keep more logs in a different location and have the replica read from there?

1 Like

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.

1 Like

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.

1 Like