Location: PHPKode > projects > SCOP Heartbeat Administration interface > scop-2.0/html/scop/config/userbackup.php

<?
include ("../inc/header.inc");
include ("../inc/functions.inc");


			$dest="/etc/scop/userbkup/ldirectord.cf";
			$orig="/etc/ha.d/conf/ldirectord.cf";

			exec ("sudo chmod 777 $dest");
			exec ("sudo chmod 777 $orig");

			if ( copy($orig,$dest) ) {
				//echo "<h2>The Virtual & Real Server settings have now been backed up....</h2>";
			} else {
				draw_error ("An error occured while trying to save the backup...");
			}

			$dest="/etc/scop/userbkup/interfaces";
			$orig="/etc/network/interfaces";

			exec ("sudo chmod 777 $dest");
			exec ("sudo chmod 777 $orig");

			if ( copy($orig,$dest) ) {
				//echo "<h2>The Network Information has now been backed up....</h2>";
			} else {
				draw_error ("An error occured while trying to save the backup...");
			}
			
			$dest="/etc/scop/userbkup/haresources";
			$orig="/etc/ha.d/haresources";

			exec ("sudo chmod 777 $dest");
			exec ("sudo chmod 777 $orig");

			if ( copy($orig,$dest) ) {
				//echo "<h2>The Virtual IP address has now been backed up....</h2>";
			} else {
				draw_error ("An error occured while trying to save the backup...");
			}

			//byLeal
			// Desbilitado temporariamente o backup do arquivo de firewall
			// $dest="/etc/scop/userbkup/rc.firewall";
			// $orig="/etc/rc.d/rc.firewall";

			// exec ("sudo chmod 777 $dest");
			// exec ("sudo chmod 777 $orig");

			// if ( copy($orig,$dest) ) {
			// 	//echo "<h2>The Firewall script has now been backed up....</h2>";
			// } else {
			// 	draw_error ("An error occured while trying to save the backup...");
			// }
			$trans="87";
			$a87 = "${$l.$trans}";
			$trans="17c";
			$a17c = "${$l.$trans}";
			echo "</br>";
			echo "<center>$a87</center></br>";
			//echo "<center><a href=\"getconfig.php\">$a17c</a></center>";

			$dest="/etc/scop/userbkup/haproxy.cfg";
			$orig="/etc/haproxy/haproxy.cfg";

			exec ("sudo chmod 777 $dest");
			exec ("sudo chmod 777 $orig");
			exec ("sudo cp $orig $dest");
#			copy($orig,$dest);

			$dest="/etc/scop/userbkup/pound.cfg";
			$orig="/usr/local/etc/pound.cfg";

			exec ("sudo chmod 777 $dest");
			exec ("sudo chmod 777 $orig");
			exec ("sudo cp $orig $dest");
#			copy($orig,$dest);


			SCOP_log("Config : Userbackup of all settings performed.");

include ("../inc/footer.inc");

?>


Return current item: SCOP Heartbeat Administration interface