<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ASP.NET MSSQL Webhosting Blog &#187; Backup</title>
	<atom:link href="http://www.mywebhostingblog.net/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mywebhostingblog.net</link>
	<description>ASP.NET, MSSQL and Windows dedicated server articles</description>
	<lastBuildDate>Tue, 10 Nov 2009 19:53:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Backup MySQL using VBS scripts</title>
		<link>http://www.mywebhostingblog.net/aspnet-web-hosting/backup-mysql-using-vbs-scripts/</link>
		<comments>http://www.mywebhostingblog.net/aspnet-web-hosting/backup-mysql-using-vbs-scripts/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 16:13:26 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[ASP.NET Web Hosting]]></category>
		<category><![CDATA[MySQL Hosting]]></category>
		<category><![CDATA[Window Hosting]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[ASP .NET]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.mywebhostingblog.net/?p=441</guid>
		<description><![CDATA[I have seen so many people searching ASP or ASP .NET scripts to backup their MySQL databases. Not only this but my Blog has been getting to many hits for the search term &#8220;backup mysql asp&#8221;. After seeing the need of so many people for the script I decided to write a VBS script to [...]]]></description>
			<content:encoded><![CDATA[<p>I have seen so many people searching <strong>ASP </strong>or <strong>ASP .NET</strong> scripts to backup their <strong>MySQL databases</strong>. Not only this but my <strong>Blog </strong>has been getting to many hits for the search term <em><strong>&#8220;backup mysql asp&#8221;</strong></em>. After seeing the need of so many people for the script I decided to write a VBS script to backup all or single <strong>MySQL database</strong> on <strong>Windows</strong> <strong>server</strong>. I am not very good at <strong>ASP </strong>so I didn&#8217;t write the script in ASP or<strong> ASP .NET</strong> but one can convert this script in either <strong>ASP </strong>or <strong>ASP .NET</strong>, it should not be a huge problem I suppose.</p>
<p style="text-align: center;"><img class="size-full wp-image-443 aligncenter" title="backup mysql VBS" src="http://www.mywebhostingblog.net/wp-content/uploads/2009/03/backup-mysql-asp.jpg" alt="backup mysql asp Backup MySQL using VBS scripts" width="259" height="92" /><span id="more-441"></span></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-442" title="backup-mysql-asp-1" src="http://www.mywebhostingblog.net/wp-content/uploads/2009/03/backup-mysql-asp-1.jpg" alt="backup mysql asp 1 Backup MySQL using VBS scripts" width="278" height="121" /></p>
<p>Please make sure of the following before you configure the script:</p>
<ul>
<li>The user that is running the script must have execute permissions on <code>cscript</code> in system32</li>
<li>The user that is running the script must have write permissions folder that is going to store the backup file.</li>
<li>The user that is running the script must have execute permissions on <code>mysqldump.exe</code> in Mysqlbin</li>
<li>If you running this script in browser then your web user will need the above permissions.</li>
</ul>
<p>So here is the script:</p>
<p><em><strong>backup-mysql-database.vbs</strong></em></p>
<p><code>Option Explicit<br />
Dim backup_dir, num_days, user, password, database, arguments, backup_file<br />
Dim oShell, oFS, oDrive, nResults, sqldump</code></p>
<p><code>backup_dir = "C:MysqlBackups"<br />
user = "xxxxxxxx"<br />
password = "yyyyyyyy"<br />
database = "zzzzzzzz"<br />
sqldump = "C:Mysqlbinmysqldump.exe"</code></p>
<p><code>backup_file = backup_dir &amp; database &amp; ".sql"<br />
arguments = "--user=" &amp; user &amp; " --password=" &amp; password &amp; " " &amp; database &amp; " &gt; " &amp; backup_file<br />
arguments = sqldump &amp; " " &amp; arguments<br />
WScript.Echo(arguments1)<br />
</code><br />
<code>Set oShell = CreateObject("WScript.Shell")</code></p>
<p><code>WScript.Echo("Creating backup file " &amp; backup_file)<br />
nResults = oShell.Run ("cmd /C" &amp; arguments, 1, TRUE)<br />
WScript.Echo(nResults)</code></p>
<p><code>Set oShell = Nothing</code></p>
<p>The following variable will be needed to be defined as per your need:</p>
<p><em><strong>backup_dir </strong></em>= Should have the path to the directory that you want to save you backup file in.<br />
<em><strong>user</strong></em> = Database user name that has full privileges over the <strong>database </strong>you want to backup.<br />
<em><strong>password</strong></em> = <strong>Password </strong>of the database user.<br />
<em><strong>database</strong></em> = Name of the database that you want to backup<br />
<em><strong>sqldump </strong></em>= Path to mysqldump.exe, normally this is stored in <strong>MySQLbin</strong> directory.</p>
<p>To backup all database you can ignore the database variable and replace the first argument command with:<br />
<code><br />
arguments = "--user=" &amp; user &amp; " --password=" &amp; password &amp; " --all-databases --quick<br />
--result-file=" &amp; backup_file</code></p>
<p>Now you can run the command below to execute the script on Windows server:</p>
<p><code>cscript c:myscriptsbackup-mysql-database.vbs</code></p>
<p>You can also <strong>schedule </strong>the above command to run on sceduled timining to backup the <strong>MySQL databases.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mywebhostingblog.net/aspnet-web-hosting/backup-mysql-using-vbs-scripts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Backup and Restore MySQL database using phpmyadmin</title>
		<link>http://www.mywebhostingblog.net/hosting-linux/backup-and-restore-mysql-database-using-phpmyadmin/</link>
		<comments>http://www.mywebhostingblog.net/hosting-linux/backup-and-restore-mysql-database-using-phpmyadmin/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 14:02:58 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Linux Server Hosting]]></category>
		<category><![CDATA[MySQL Hosting]]></category>
		<category><![CDATA[Window Hosting]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Restore]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.mywebhostingblog.net/?p=102</guid>
		<description><![CDATA[Log into Plesk Control Panel and  steer yourself to &#8220;phpMyAdmin&#8221; For Backup of MySQL database click on Export. 1) Make sure that entire database is selected for Export, and not just one table. All the Tables under Database list should be added in Export List. 2) Now, follow the steps given select &#8220;SQL&#8221; for output [...]]]></description>
			<content:encoded><![CDATA[<p>Log into<strong> Plesk Control Panel</strong> and  steer yourself to &#8220;<strong>phpMyAdmin</strong>&#8221;</p>
<p>For Backup of <strong>MySQL database</strong> click on Export.</p>
<p>1) Make sure that entire database is selected for Export, and not just one table.<br />
All the <strong>Tables </strong>under <strong>Database </strong>list should be added in Export List.</p>
<p>2) Now, follow the steps given<br />
select &#8220;<strong>SQL</strong>&#8221; for output format<br />
Check &#8220;Structure&#8221;<br />
and &#8220;Add <strong>AUTO_INCREMENT</strong>&#8221; value<br />
Check &#8220;Enclose table and field name with back quotes&#8221;<br />
Check &#8220;<strong>DATA</strong>&#8221;<br />
check use &#8220;hexadecimal for binary field&#8221;<br />
Export type set to &#8220;<strong>INSERT</strong>&#8221;</p>
<p>3) Check &#8220;Save as file&#8221;, it is not necessary to change the file name.<br />
Click &#8220;GO&#8221; to download the <strong>backup </strong>file.</p>
<p><strong>Backup </strong>of your <strong>MySQL</strong> <strong>database </strong>is created !</p>
<p>Now, for Restoring backup of<strong> MySql database</strong></p>
<p>1) Click on <strong>SQL </strong>tab, to start restoration of your backup file.</p>
<p>2) Un-Check &#8220;Show this <strong>query </strong>here again&#8221;.</p>
<p>3) Browse to your <strong>database </strong>backup file.</p>
<p>4) Click &#8211; &#8220;GO&#8221;</p>
<p><strong>Backup is Restored !</strong></p>
<p><strong>Large MySQL Backups:</strong></p>
<p>Error: MySQL has gone away</p>
<p>To restore large SQL backups there are 2 setting that you will need to take of:</p>
<p>1. Make sure that you PHP upload size is great than your <strong>MySQL backup</strong> file, this setting will be needed to be changed in php.ini file. Only those who has server administrator access would be able to make changes in <em><strong>PHP.INI</strong></em> file. Hence you will have to contact your <strong>Hosting </strong>provider if you are hosted on a <strong>Shared server</strong>. But if you have a <strong>Dedicated Server</strong> then this file is normally stored in <strong>C:\Windows\php.ini</strong> or you can esily get the path from <em><strong>phpinfo()</strong></em> page. The option that you need to change is <em><strong>upload_max_filesize</strong></em>. It is also suggested that you increase the following parameters as per the size of your MySQL backup file:</p>
<p><em><strong>max_execution_time = 30     ; Maximum execution time of each script, in seconds<br />
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data<br />
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)</strong></em></p>
<p>2. You will need to increase the MySQL buffer size in MySQL configuration size, the file is <em><strong>my.cnf</strong></em> in Linux server and <em><strong>my.ini</strong></em> on Windows Server. The parameter that you need to change is:</p>
<p><em><strong>read_buffer_size</strong></em></p>
<p>By default it is set to 1MB, if the entry is not present then add it under [MYSQLD] section.</p>
<p>Please Make sure that you <strong>restart IIS webserver</strong> after making change to <em><strong>php.ini</strong></em> and <strong>restart MySQL</strong> after making changes in <em><strong>my.ini</strong></em> file.</p>
<p>If you<strong> </strong>looking backup MySQL using VBS or ASP script then refer the link below:</p>
<p><a title="MySQL backup with VBS or ASP" href="http://www.mywebhostingblog.net/aspnet-web-hosting/backup-mysql-using-vbs-scripts/" target="_self"><em><strong>How to backup MySQL using VBS or ASP script.</strong></em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mywebhostingblog.net/hosting-linux/backup-and-restore-mysql-database-using-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
