Location: PHPKode > scripts > Web Server Backup > backup/en/test.php
<title>Testing Backup</title>
	// Includes the class Backup
	include ("cls_backup.php");
	// Crea the object
	$backup = new backup;
	// Sets the parameters
	$backup->set_etiqueta ("test");
	$backup->set_dir_origen ("src_dir/");
	$backup->set_dir_destino ("dest_dir");
	$backup->set_bd_host ("host");
	$backup->set_bd_usr ("user");
	$backup->set_bd_clave ("password");
	$backup->set_bd_nombre ("db_name");
	// Evaluates the parameter modo
	switch ($_GET["modo"])
		// Compress the directory specified by set_dir_origen () and downloads
		// the zip file
		case "files":
			$backup->backup_files ();
		// Dumps DB into a file and downloads it
		case "db":
			$backup->backup_mysql ();
		// Shows backup options
		case "":
			echo "<p><a href=\"?modo=files\">Files</a></p>";
			echo "<p><a href=\"?modo=db\">DB</a>";
Return current item: Web Server Backup