'$ipAddrBase', first => '$first', last => '$last', }, ];"; } $DEFAULT .= " \$Conf{BackupPCUser} = 'backuppc'; \$Conf{CgiDir} = '/usr/share/backuppc/cgi-bin'; \$Conf{InstallDir} = '/usr/share/backuppc'; \$Conf{BackupPCUserVerify} = 1; \$Conf{HardLinkMax} = 31999; \$Conf{SmbShareName} = 'C$'; \$Conf{SmbShareUserName} = ''; \$Conf{SmbSharePasswd} = ''; \$Conf{TarShareName} = '/'; \$Conf{FullPeriod} = $FullPeriod; \$Conf{IncrPeriod} = $IncrPeriod; \$Conf{FullKeepCnt} = $FullKeepCnt; \$Conf{FullKeepCntMin} = $FullKeepCntMin; \$Conf{FullAgeMax} = $FullAgeMax; \$Conf{IncrKeepCnt} = $IncrKeepCnt; \$Conf{IncrKeepCntMin} = $IncrKeepCntMin; \$Conf{IncrLevels} = $IncrLevels; \$Conf{IncrAgeMax} = $IncrAgeMax; \$Conf{PartialAgeMax} = 3; \$Conf{IncrFill} = 0; \$Conf{RestoreInfoKeepCnt} = 10; \$Conf{ArchiveInfoKeepCnt} = 10; \$Conf{BackupFilesOnly} = undef; \$Conf{BackupFilesExclude} = undef; \$Conf{BlackoutBadPingLimit} = 3; \$Conf{BlackoutGoodCnt} = 7; \$Conf{BlackoutPeriods} = [ { hourBegin => $hourBegin, hourEnd => $hourEnd, weekDays => $weekDays, }, ]; \$Conf{BackupZeroFilesIsFatal} = 1; ########################################################################### # General per-PC configuration settings # (can be overridden in the per-PC config.pl) ########################################################################### \$Conf{XferLogLevel} = 1; \$Conf{SmbClientPath} = '/usr/bin/smbclient'; \$Conf{SmbClientFullCmd} = '\$smbClientPath \\\\\$host\\\$shareName' . ' \$I_option -U \$userName -E -N -d 1' . ' -c tarmode\\ full -Tc\$X_option - \$fileList'; \$Conf{SmbClientIncrCmd} = '\$smbClientPath \\\\\$host\\\$shareName' . ' \$I_option -U \$userName -E -N -d 1' . ' -c tarmode\\ full -TcN\$X_option \$timeStampFile - \$fileList'; \$Conf{SmbClientRestoreCmd} = '\$smbClientPath \\\\\$host\\\$shareName' . ' \$I_option -U \$userName -E -N -d 1' . ' -c tarmode\\ full -Tx -'; \$Conf{TarClientCmd} = '\$sshPath -q -x -n -l root \$host' . ' /usr/bin/env LC_ALL=C \$tarPath -c -v -f - -C \$shareName+' . ' --totals'; \$Conf{TarFullArgs} = '\$fileList+'; \$Conf{TarIncrArgs} = '--newer=\$incrDate \$fileList+'; \$Conf{TarClientRestoreCmd} = '\$sshPath -q -x -l root \$host' . ' /usr/bin/env LC_ALL=C \$tarPath -x -p --numeric-owner --same-owner' . ' -v -f - -C \$shareName+'; \$Conf{TarClientPath} = '/bin/tar'; \$Conf{RsyncClientPath} = '/usr/bin/rsync'; \$Conf{RsyncClientCmd} = '\$sshPath -q -x -l root \$host \$rsyncPath \$argList+'; \$Conf{RsyncClientRestoreCmd} = '\$sshPath -q -x -l root \$host \$rsyncPath \$argList+'; \$Conf{RsyncdClientPort} = 873; \$Conf{RsyncdUserName} = ''; \$Conf{RsyncdPasswd} = ''; \$Conf{RsyncdAuthRequired} = 1; \$Conf{RsyncCsumCacheVerifyProb} = 0.01; \$Conf{RsyncArgs} = [ '--numeric-ids', '--perms', '--owner', '--group', '--devices', '--links', '--times', '--block-size=2048', '--recursive', ]; \$Conf{RsyncRestoreArgs} = [ '--numeric-ids', '--perms', '--owner', '--group', '--devices', '--links', '--times', '--block-size=2048', '--relative', '--ignore-times', '--recursive', ]; \$Conf{ArchiveDest} = '/tmp'; \$Conf{ArchiveComp} = 'gzip'; \$Conf{ArchivePar} = 0; \$Conf{ArchiveSplit} = 0; \$Conf{ArchiveClientCmd} = '\$Installdir/bin/BackupPC_archiveHost' . ' \$tarCreatePath \$splitpath \$parpath \$host \$backupnumber' . ' \$compression \$compext \$splitsize \$archiveloc \$parfile *'; \$Conf{SshPath} = '/usr/bin/ssh'; \$Conf{NmbLookupPath} = '/usr/bin/nmblookup'; \$Conf{NmbLookupCmd} = '\$nmbLookupPath -A \$host'; \$Conf{NmbLookupFindHostCmd} = '\$nmbLookupPath \$host'; \$Conf{FixedIPNetBiosNameCheck} = 0; \$Conf{PingPath} = '/bin/ping'; \$Conf{PingCmd} = '\$pingPath -c 1 \$host'; \$Conf{ServerInitdPath} = ''; \$Conf{ServerInitdStartCmd} = ''; \$Conf{CompressLevel} = 3; \$Conf{PingMaxMsec} = 20; \$Conf{ClientTimeout} = 7200; \$Conf{MaxOldPerPCLogFiles} = 12; \$Conf{DumpPreUserCmd} = undef; \$Conf{DumpPostUserCmd} = undef; \$Conf{RestorePreUserCmd} = undef; \$Conf{RestorePostUserCmd} = undef; \$Conf{ArchivePreUserCmd} = undef; \$Conf{ArchivePostUserCmd} = undef; \$Conf{ClientNameAlias} = undef; \$Conf{PerlModuleLoad} = undef; ########################################################################### # Email reminders, status and messages # (can be overridden in the per-PC config.pl) ########################################################################### \$Conf{SendmailPath} = '/usr/sbin/sendmail'; \$Conf{EMailNotifyMinDays} = 2.5; \$Conf{EMailFromUserName} = 'backuppc'; \$Conf{EMailAdminUserName} = '$EMailAdminUserName'; \$Conf{EMailNotifyOldBackupDays} = 7.0; \$Conf{EMailNoBackupRecentSubj} = undef; \$Conf{EMailNoBackupRecentMesg} = undef; \$Conf{EMailNotifyOldOutlookDays} = 5.0; \$Conf{EMailOutlookBackupSubj} = undef; \$Conf{EMailOutlookBackupMesg} = undef; ########################################################################### # CGI user interface configuration settings # (can be overridden in the per-PC config.pl) ########################################################################### \$Conf{CgiAdminUserGroup} = 'backuppc'; \$Conf{CgiAdminUsers} = 'backuppc'; \$Conf{CgiURL} = 'http://'.\$Conf{ServerHost}.'/backuppc/index.cgi'; \$Conf{Language} = 'fr'; \$Conf{CgiUserHomePageCheck} = ''; \$Conf{CgiUserUrlCreate} = 'mailto:%s'; \$Conf{CgiDateFormatMMDD} = 0; \$Conf{CgiNavBarAdminAllHosts} = 1; \$Conf{CgiSearchBoxEnable} = 1; \$Conf{CgiNavBarLinks} = [ { link => \"?action=view&type=docs\", lname => \"Documentation\", }, { link => \"http://backuppc.sourceforge.net/faq\", name => \"FAQ\", }, { link => \"http://backuppc.sourceforge.net\", name => \"SourceForge\", }, ]; \$Conf{CgiStatusHilightColor} = { Reason_backup_failed => '#ffcccc', Reason_backup_done => '#ccffcc', Reason_no_ping => '#ffff99', Reason_backup_canceled_by_user => '#ff9900', Status_backup_in_progress => '#66cc99', }; \$Conf{CgiHeaders} = ''; \$Conf{CgiImageDir} = '/usr/share/backuppc/image'; \$Conf{CgiExt2ContentType} = { }; \$Conf{CgiImageDirURL} = '/backuppc/image'; \$Conf{CgiCSSFile} = 'BackupPC_stnd.css'; "; fwrite($fp,$DEFAULT); fclose($fp); // test si on peut ecrire dans le repertoire parent if ($bpcmedia != "1") { if (is_link("/var/lib/backuppc")) { $drive=readlink('/var/lib/backuppc'); } else { $drive="/var/lib/backuppc"; } // $droits_ok=TestEcrire($drive); // if ($droits_ok!="1") { // echo "
"; // echo gettext("Attention, la sauvegarde n'a pas les droits nécessaires sur le répertoire parent.
Vous devez modifer les droits en faisant un chown -R backuppc")." $drive."; // echo "
"; // echo "

"; // } } // reload la conf if (EtatBackupPc ()=="1") { reloadBackuPpc(); } else { startBackupPc(); } } /****************************************************************************************/ // Relit le fichier pour avoir les variables if(file_exists("/etc/backuppc/config.pl")) { $WakeupSchedule = variables(WakeupSchedule,config); $FullPeriod = variables(FullPeriod,config); $IncrPeriod = variables(IncrPeriod,config); $FullKeepCnt = variables(FullKeepCnt,config); $FullKeepCntMin = variables(FullKeepCntMin,config); $IncrKeepCnt = variables(IncrKeepCnt,config); $IncrKeepCntMin = variables(IncrKeepCntMin,config); $FullAgeMax = variables(FullAgeMax,config); $IncrAgeMax = variables(IncrAgeMax,config); $EMailAdminUserName = variables(EMailAdminUserName,config); $hourBegin = variables(hourBegin,config); $hourEnd = variables(hourEnd,config); $weekDays = variables(weekDays,config); $ipAddrBase = variables(ipAddrBase,config); if (ereg("'(.*)'",$ipAddrBase,$reg)) { $ipAddrBase=trim($reg[1]); } $first = variables(first,config); if (ereg("'(.*)'",$first,$reg)) { $first=trim($reg[1]); } $last = variables(last,config); if (ereg("'(.*)'",$last,$reg)) { $last=trim($reg[1]); } } else { //valeurs par defaut if ($WakeupSchedule == "") { $WakeupSchedule = "1..23"; } if ($FullPeriod == "") { $FullPeriod = "6.97"; } if ($IncrPeriod == "") { $IncrPeriod = "0.97"; } if ($FullKeepCnt == "") { $FullKeepCnt = "1"; } if ($FullKeepCntMin == "") { $FullKeepCntMin = "1"; } if ($IncrKeepCnt == "") { $IncrKeepCnt = "6"; } if ($IncrKeepCntMin == "") { $IncrKeepCntMin = "1"; } if ($FullAgeMax == "") { $FullAgeMax = "90"; } if ($IncrAgeMax == "") { $IncrAgeMax = "30"; } if ($hourBegin == "") { $hourBegin = "6.0"; } if ($hourEnd == "") { $hourEnd = "20.0"; } $weekDays = "[1,2,3,4,5,,]"; $weekDays = ereg_replace(",,|,,,|,,,,|,,,,,|,,,,,,",",",$weekDays); $weekDays = ereg_replace("\[,","[",$weekDays); $weekDays = ereg_replace(",\]","]",$weekDays); } /***********************************************************************/ echo "

"; echo gettext("Configuration par défaut de Backuppc"); echo "

"; if ($_GET['action'] == "modif") { if (EtatBackupPc() == "1") { echo "

"; echo gettext("Relecture du fichier de conf. Modifications prises en compte"); echo "

"; } if (EtatBackupPc() == "0") { echo "

"; echo gettext ("Impossible de relancer BackupPc. Vous devez avoir introduit une erreur dans votre fichier de configuration. Veuillez la corriger"); echo "

"; } } echo "
"; echo "

"; echo ""; echo ""; echo "\n"; echo ""; echo "
"; echo gettext("Heure ou sera testée si la sauvegarde doit être lancée :"); echo "
\n"; //Periode de blackout echo ""; echo "\n"; echo ""; echo "\n"; echo "
"; echo gettext("Heure du début"); echo "". gettext("Heure de fin")."
"; echo gettext("Lun")." "; echo gettext(" Mar")." "; echo gettext(" Mer")." "; echo gettext(" Jeu")." "; echo gettext(" Ven")." "; echo gettext(" Sam")." "; echo gettext(" Dim")." "; echo "


"; // Nombre de jours entre deux sauvegardes echo " "; echo "\n"; echo "
"; echo gettext("Entre deux sauvegardes complètes :"); echo "
".gettext("Entre deux sauvegardes incrémentales :")."


"; // Nombre de sauvegardes a conserver echo ""; echo "\n"; echo "
".gettext("En temps normal")." ".gettext("Au minimum")."
".gettext("Complete :")." ".gettext("Complete :")."
".gettext("Incrémentale :")." ".gettext("Incrémentale :")."

"; // Suppression des anciennes sauvegardes echo ""; echo "\n"; echo "
".gettext("Nb de jours après lesquels les sauvegardes complètes
seront supprimées")."
".gettext("Nb de jours après lesquel les sauvegardes incrémentielles
seront supprimées")."
\n"; echo "

"; // Recherche par DHCP echo ""; echo "\n"; echo "
".gettext("Adresse de base (forme 172.16.0) :")."
".gettext("Adresse de début :")."
".gettext("Adresse de fin :")."
\n"; echo "

"; // Mail de l'administrateur devant recevoir les alertes de sauvegarde echo ""; echo "\n"; echo ""; echo "
"; echo gettext("Mail envoyé par défaut à :"); echo "
\n"; echo "

"; echo "
Les champs vides, seront automatiquement complétés, avec les valeurs par défaut.

Si celui-ci ne se relance pas, cela implique très probablement une erreur dans le fichier.')"); echo "\">
\n"; require ("pdp.inc.php"); } ?>