CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 shedule backup mssql

Print topic Send  topic

Author Message
puia_nicu

Posts: 1
Posted: 07/07/2006, 6:05 AM

:( can somebody help me?
i want to backup a database in mssql and its backup name i`d like to contain date and time also.
I tried with "datetime" inside of the name of backup name and...
nothin, that function is taken as a name not as a function.
If somebody see this topic ..i`m waiting..
10x
_________________
yours,nick
View profile  Send private message
martin k.
Posted: 07/07/2006, 10:19 PM

Hello.
Try this:

$host = "localhost";
$user = "";
$pass = "";
$orgi_db = "db1234567";
$new_backup = date("Ymd_Hi") . "_" . $orgi_db;
$path = "/www/htdocs/12345/backups";

system(sprintf(
'mysqldump --opt -h %s -u %s -p%s %s | gzip > %s/'.$new_backup.'.sql.gz',
$host,
$user,
$pass,
$orgi_db,
$path
));

echo '+DONE';

will give you something like this:

20060711_1133_db1234567.sql.gz

greets martin k.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.