4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
10 # Add main .conf files
11 local $conf = &get_config();
12 push(@rv, map { $_->{'file'} } @$conf);
14 # Add all master and hint zone files
15 local @views = &find("view", $conf);
18 local @vz = &find("zone", $v->{'members'});
21 push(@zones, &find("zone", $conf));
24 local $tv = &find_value("type", $z->{'members'});
25 next if ($tv ne "master" && $tv ne "hint");
26 local $file = &find_value("file", $z->{'members'});
28 local @recs = &read_zone_file($file, $z->{'value'});
29 push(@rv, map { $_->{'file'} } @recs);
32 return map { &make_chroot($_) } &unique(@rv);
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
61 local $pidfile = &get_pid_file();
62 if (&check_pid_file(&make_chroot($pidfile, 1))) {
63 return &restart_bind();