mirror of
https://github.com/webmin/webmin.git
synced 2026-09-14 01:20:38 +01:00
Backup config support
This commit is contained in:
@@ -13,3 +13,5 @@ Made the auto-registration email contents translatable.
|
||||
Fixed return link when using a framed theme.
|
||||
---- Changes since 1.320 ----
|
||||
Added several new operating systems and distributions to the server type list.
|
||||
---- Changes since 1.420 ----
|
||||
Allow the Backup Configuration Files module to save and restore Webmin server details.
|
||||
|
||||
41
servers/backup_config.pl
Normal file
41
servers/backup_config.pl
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
do 'servers-lib.pl';
|
||||
|
||||
# backup_config_files()
|
||||
# Returns files and directories that can be backed up
|
||||
sub backup_config_files
|
||||
{
|
||||
local @rv = map { $_->{'file'} } &list_servers();
|
||||
return @rv;
|
||||
}
|
||||
|
||||
# pre_backup(&files)
|
||||
# Called before the files are actually read
|
||||
sub pre_backup
|
||||
{
|
||||
return undef;
|
||||
}
|
||||
|
||||
# post_backup(&files)
|
||||
# Called after the files are actually read
|
||||
sub post_backup
|
||||
{
|
||||
return undef;
|
||||
}
|
||||
|
||||
# pre_restore(&files)
|
||||
# Called before the files are restored from a backup
|
||||
sub pre_restore
|
||||
{
|
||||
return undef;
|
||||
}
|
||||
|
||||
# post_restore(&files)
|
||||
# Called after the files are restored from a backup
|
||||
sub post_restore
|
||||
{
|
||||
return undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -56,6 +56,7 @@ sub get_server
|
||||
local $serv;
|
||||
$serv->{'id'} = $_[0];
|
||||
&read_file("$module_config_directory/$_[0].serv", $serv) || return undef;
|
||||
$serv->{'file'} = "$module_config_directory/$_[0].serv";
|
||||
return $serv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user