Files
webmin/mysql/flush_binlogs.cgi
Ilia Ross b3b81af34f Add MySQL binary log management
This PR adds a "Binary Logging" page to configure log format, file size and retention, rotate or purge logs, and support restore sessions that do not write back to binary logs.
2026-08-28 02:16:50 +02:00

14 lines
397 B
Perl
Executable File

#!/usr/local/bin/perl
# Close the current binary log and start writing a new one
require './mysql-lib.pl';
$access{'perms'} == 1 || &error($text{'binlogs_ecannot'});
&error_setup($text{'binlogs_rotateerr'});
&ReadParse();
my ($curfile) = &get_binary_log_status();
$curfile || &error($text{'binlogs_epurgeoff'});
&rotate_binary_logs();
&webmin_log("flushbinlogs");
&redirect("edit_binlogs.cgi");