Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 21

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 'How Do I' Questions

 
 
LinkBack Thread Tools Display Modes
Old 29.04.2004, 14:54   #1 (permalink)
Mamber
 
Join Date: Apr 2004
Posts: 107
vivekhyd is on a distinguished road
Arrow Admin Backend -> website backup option no longer working

I run a medium sized website using mambo and i am unable to backup the site (data and tables).I tried all options and it does not work. i prefer having back-ups as zip file in my computer and that does not seem to happen.

It used to work before and as the size grew..it stopped responding. As in the pop-up box asking me to save the file does not come.What could be the reason, the website size?

In that will other back-up utilities work with mambo?

or is there any module/component that can conduct periodic back-ups?
vivekhyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 29.04.2004, 15:39   #2 (permalink)
Baby Mamber
 
shift's Avatar
 
Join Date: Apr 2004
Location: Como (Italy)
Posts: 18
shift is on a distinguished road
Send a message via AIM to shift
Default Re: Website back-up is faulty

I use this one with a crontab. This send me the db backup via email.

Code:
#! /usr/bin/php -q
<?php


$dbhost = 'localhost'; // Server address of your MySQL Server
$dbuser = ' '; // Username to access MySQL database
$dbpass = ' '; // Password to access MySQL database
$dbname = ' '; // Database Name


$use_gzip = "yes";  // Set to No if you don't want the files sent in .gz format
$remove_sql_file = "yes"; // Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.
$remove_gzip_file = "yes"; // Set this to yes if you want to delete the gzip file also. I recommend leaving it to "no"
 

$savepath = "/path/to/dbsender"; // Full path to this directory. Do not use trailing slash!

$send_email = "yes";  // Do you want this database backup sent to your email? Fill out the next 2 lines
$to      = "you@you.com";  // Who to send the emails to
$from    = "webmaster@you.com"; // Who should the emails be sent from?

$senddate = date("j F Y");

$subject = "Database Backup - $senddate"; // Subject in the email to be sent.
$message = "Your MySQL database has been backed up and is attached to this email"; // Brief Message.


$use_ftp = ""; // Do you want this database backup uploaded to an ftp server? Fill out the next 4 lines
$ftp_server = ""; // FTP hostname
$ftp_user_name = ""; // FTP username
$ftp_user_pass = ""; // FTP password
$ftp_path = ""; // This is the path to upload on your ftp server!


	$date = date("mdy-hia");
	$filename = "$savepath/$dbname-$date.sql";	
	passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname >$filename");
	
	if($use_gzip=="yes"){
		$zipline = "tar -czf ".$dbname."-".$date."_sql.tar.gz $dbname-$date.sql";
		shell_exec($zipline);
	}
	if($remove_sql_file=="yes"){
		exec("rm -r -f $filename");
	}
	
	if($use_gzip=="yes"){
		$filename2 = "$savepath/".$dbname."-".$date."_sql.tar.gz";
	} else {
		$filename2 = "$savepath/$dbname-$date.sql";
	}
	
	
	if($send_email == "yes" ){
		$fileatt_type = filetype($filename2);
		$fileatt_name = "".$dbname."-".$date."_sql.tar.gz";
		
		$headers = "From: $from";
		
		$file = fopen($filename2,'rb');
		$data = fread($file,filesize($filename2));
		fclose($file);
	
		$semi_rand = md5(time());
		$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
	
		$headers .= "\nMIME-Version: 1.0\n" ."Content-Type: multipart/mixed;\n" ." boundary=\"{$mime_boundary}\"";
	
		$message = "This is a multi-part message in MIME format.\n\n" ."--{$mime_boundary}\n" ."Content-Type: text/plain; charset=\"iso-8859-1\"\n" ."Content-Transfer-Encoding: 7bit\n\n" .
		$message . "\n\n";
	
		$data = chunk_split(base64_encode($data));
	
		$message .= "--{$mime_boundary}\n" ."Content-Type: {$fileatt_type};\n" ." name=\"{$fileatt_name}\"\n" ."Content-Disposition: attachment;\n" ." filename=\"{$fileatt_name}\"\n" ."Content-Transfer-Encoding: base64\n\n" .
		$data . "\n\n" ."--{$mime_boundary}--\n";
	
		$ok = @mail($to, $subject, $message, $headers);
		if ($ok) {
			echo "<h4><center>Database backup created and sent! File name $filename2</center></h4>";
		} else {
			echo "<h4><center>Mail could not be sent. Sorry!</center></h4>";
		}
	}
	
	if($use_ftp == "yes"){
		$ftpconnect = "ncftpput -u $ftp_user_name -p $ftp_user_pass -d debsender_ftplog.log -e dbsender_ftplog2.log -a -E -V $ftp_server $ftp_path $filename2";
		shell_exec($ftpconnect);
		echo "<h4><center>$filename2 Was created and uploaded to your FTP server!</center></h4>";
	
	}
	
	if($remove_gzip_file=="yes"){
		exec("rm -r -f $filename2");
	}

?>
shift is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 29.04.2004, 16:04   #3 (permalink)
Expert Mamber
 
BennieBlanco's Avatar
 
Join Date: Apr 2004
Posts: 464
BennieBlanco is on a distinguished road
Default Re: Website back-up is faulty

Quote:
Originally Posted by shift
I use this one with a crontab. This send me the db backup via email.

Code:
#! /usr/bin/php -q
<?php


$dbhost = 'localhost'; // Server address of your MySQL Server
$dbuser = ' '; // Username to access MySQL database
$dbpass = ' '; // Password to access MySQL database
$dbname = ' '; // Database Name


$use_gzip = "yes";  // Set to No if you don't want the files sent in .gz format
$remove_sql_file = "yes"; // Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.
$remove_gzip_file = "yes"; // Set this to yes if you want to delete the gzip file also. I recommend leaving it to "no"
 

$savepath = "/path/to/dbsender"; // Full path to this directory. Do not use trailing slash!

$send_email = "yes";  // Do you want this database backup sent to your email? Fill out the next 2 lines
$to      = "you@you.com";  // Who to send the emails to
$from    = "webmaster@you.com"; // Who should the emails be sent from?

$senddate = date("j F Y");

$subject = "Database Backup - $senddate"; // Subject in the email to be sent.
$message = "Your MySQL database has been backed up and is attached to this email"; // Brief Message.


$use_ftp = ""; // Do you want this database backup uploaded to an ftp server? Fill out the next 4 lines
$ftp_server = ""; // FTP hostname
$ftp_user_name = ""; // FTP username
$ftp_user_pass = ""; // FTP password
$ftp_path = ""; // This is the path to upload on your ftp server!


	$date = date("mdy-hia");
	$filename = "$savepath/$dbname-$date.sql";	
	passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname >$filename");
	
	if($use_gzip=="yes"){
		$zipline = "tar -czf ".$dbname."-".$date."_sql.tar.gz $dbname-$date.sql";
		shell_exec($zipline);
	}
	if($remove_sql_file=="yes"){
		exec("rm -r -f $filename");
	}
	
	if($use_gzip=="yes"){
		$filename2 = "$savepath/".$dbname."-".$date."_sql.tar.gz";
	} else {
		$filename2 = "$savepath/$dbname-$date.sql";
	}
	
	
	if($send_email == "yes" ){
		$fileatt_type = filetype($filename2);
		$fileatt_name = "".$dbname."-".$date."_sql.tar.gz";
		
		$headers = "From: $from";
		
		$file = fopen($filename2,'rb');
		$data = fread($file,filesize($filename2));
		fclose($file);
	
		$semi_rand = md5(time());
		$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
	
		$headers .= "\nMIME-Version: 1.0\n" ."Content-Type: multipart/mixed;\n" ." boundary=\"{$mime_boundary}\"";
	
		$message = "This is a multi-part message in MIME format.\n\n" ."--{$mime_boundary}\n" ."Content-Type: text/plain; charset=\"iso-8859-1\"\n" ."Content-Transfer-Encoding: 7bit\n\n" .
		$message . "\n\n";
	
		$data = chunk_split(base64_encode($data));
	
		$message .= "--{$mime_boundary}\n" ."Content-Type: {$fileatt_type};\n" ." name=\"{$fileatt_name}\"\n" ."Content-Disposition: attachment;\n" ." filename=\"{$fileatt_name}\"\n" ."Content-Transfer-Encoding: base64\n\n" .
		$data . "\n\n" ."--{$mime_boundary}--\n";
	
		$ok = @mail($to, $subject, $message, $headers);
		if ($ok) {
			echo "<h4><center>Database backup created and sent! File name $filename2</center></h4>";
		} else {
			echo "<h4><center>Mail could not be sent. Sorry!</center></h4>";
		}
	}
	
	if($use_ftp == "yes"){
		$ftpconnect = "ncftpput -u $ftp_user_name -p $ftp_user_pass -d debsender_ftplog.log -e dbsender_ftplog2.log -a -E -V $ftp_server $ftp_path $filename2";
		shell_exec($ftpconnect);
		echo "<h4><center>$filename2 Was created and uploaded to your FTP server!</center></h4>";
	
	}
	
	if($remove_gzip_file=="yes"){
		exec("rm -r -f $filename2");
	}

?>
can you give me an example where you place this code?
and wher and what time limit do you set
I actualy want to have bacups send to me every day
thank's
__________________
www.bluehost.com
BennieBlanco is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 30.04.2004, 07:50   #4 (permalink)
Mamber
 
Join Date: Apr 2004
Posts: 107
vivekhyd is on a distinguished road
Default Re: Admin Backend -> website backup option no longer working

how do we use this thig?
vivekhyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOw do I ... Migrate a website to another server? sh33zo Mambo 4.5 'How Do I' Questions 21 11.08.2005 10:04
Back up website a1nerd Mambo 4.5 'How Do I' Questions 1 26.04.2004 12:30
Website to interchange banners. Free for websites maden with mambo. Pako Navas Community Announcements 2 24.04.2004 23:15
Welcome back Hanniball Mamboportal.com 0 06.04.2004 23:29


All times are GMT +2. The time now is 05:29.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.