Private
Server IP : 195.201.23.43  /  Your IP : 18.219.89.186
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/webmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/webmin/backup_config.pl
do 'webmin-lib.pl';

# backup_config_files()
# Returns files and directories that can be backed up
sub backup_config_files
{
&get_miniserv_config(\%miniserv);
my @rv = ( "$config_directory/config",
	      "$config_directory/miniserv.conf",
	      "$config_directory/webmin.cats",
	      "$config_directory/webmin.catnames",
	      "$config_directory/webmin.desc",
	      $miniserv{'keyfile'},
	      $miniserv{'certfile'},
	      $miniserv{'ca'},
	      $newmodule_users_file,
	      "$config_directory/custom-lang",
	      glob("$config_directory/*/custom-lang"),
	    );
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
{
# Get current configs, for later merging
&get_miniserv_config(\%oldminiserv);
&read_file("$config_directory/config", \%oldconfig);
return undef;
}

# post_restore(&files)
# Called after the files are restored from a backup
sub post_restore
{
# Merge in local settings that cannot be copied
my %miniserv;
&get_miniserv_config(\%miniserv);
foreach my $k (keys %oldminiserv) {
	my $copy = 0;
	foreach my $keep ("root", "mimetypes", "logfile", "pidfile",
			  "env_WEBMIN_CONFIG", "env_WEBMIN_VAR", "logout",
			  "userfile", "passwd_.*") {
		$copy = 1 if ($k =~ /^$keep$/);
		}
	$miniserv{$k} = $oldminiserv{$k} if ($copy);
	}
&put_miniserv_config(\%miniserv);

my %gconfig;
&read_file("$config_directory/config", \%gconfig);
foreach my $k (keys %oldconfig) {
	my $copy = 0;
	foreach my $nocopy ("os_type", "os_version",
			    "real_os_type", "real_os_version",
			    "find_pid_command", "ld_env", "passwd_.*") {
		$copy = 1 if ($k =~ /^$keep$/);
		}
	$config{$k} = $oldconfig{$k} if ($copy);
	}
&write_file("$config_directory/config", \%gconfig);

unlink("$config_directory/module.infos.cache");
&restart_miniserv();
return undef;
}

1;

Private