4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
10 # Add main config file
11 push(@rv, $config{'postfix_config_file'});
14 push(@rv, &get_maps_files("alias_maps"));
15 push(@rv, &get_maps_files("alias_database"));
16 push(@rv, &get_maps_files("canonical_maps"));
17 push(@rv, &get_maps_files("recipient_canonical_maps"));
18 push(@rv, &get_maps_files("sender_canonical_maps"));
19 push(@rv, &get_maps_files($virtual_maps));
20 push(@rv, &get_maps_files("transport_maps"));
21 push(@rv, &get_maps_files("relocated_maps"));
23 # Add other files in /etc/postfix
24 local $cdir = &guess_config_dir();
26 foreach $f (readdir(DIR)) {
27 next if ($f eq "." || $f eq ".." || $f =~ /\.(db|dir|pag)$/i);
28 push(@rv, "$cdir/$f");
36 # Called before the files are actually read
43 # Called after the files are actually read
50 # Called before the files are restored from a backup
56 # post_restore(&files)
57 # Called after the files are restored from a backup
60 if (&is_postfix_running()) {
61 local $out = `$config{'postfix_control_command'} -c $config_dir reload 2>&1`;
62 return "<tt>$out</tt>" if ($?);