Avatar of rgb192
rgb192Flag for United States of America

asked on 

how can I backup a mysql database on shared linux godaddy

how can I backup a mysql database on shared linux godaddy

Thank you for contacting Professional Hosting Support. I understand that you would like to create daily backups of your MySQL databases.  Please note that in an effort to protect the integrity of your account, company policy restricts Customer Support Representatives from making changes to customer accounts or services on behalf of the customer.  As such, we cannot modify your account to create the backups on your behalf.

If you would like to allow for autonomous routine tasks to be executed on your shared linux hosting account, rather than manually backing up your MySQL databases every day, you will need to create a cron job to do so.  Please note, however, that because we do not directly support coding and scripting, we are unable to advise specifically as to how you should code the command of your cron job(s) to create the backup(s)--for more advice on this, we recommend that you consult your preferred search engine for more information.

Cron is a standard Linux feature that allows you to schedule tasks, called "Cron Jobs," to run unattended at a specified frequency. For example, you can set the frequency of a job to run twice an hour, Mondays at 8:00 a.m., or weekdays at 12:00 p.m. and 6:00 p.m.

Cron Job reports are sent to the email address specified in the Hosting Control Panel Cron Job Manager.

There are several ways to schedule commands to run. Typically, you create a shell script to run as a Cron Job. It runs a list of commands while checking for errors and valid return codes. To run a shell script, set its bit set permissions to "executable." Alternatively, compose a binary executable with a number of arguments. For example, "touch" a file:

/bin/touch $HOME/html/cron_test

The first part of this sample command, "/bin/touch" runs the executable. The second part, "$HOME/html/cron_test" is an argument for the "touch" command.

NOTE: In the example above, the "$HOME" variable is set to the default directory of the hosting account. The "html" directory is the document root of the hosting account.

In addition to shell scripts, your hosting environment supports other language scripts. For example, Perl is a commonly used scripting language that can use scripts as Cron Jobs. In most cases, you can perform this task by specifying to use the executable as the first line of the script. For example:

#!/usr/bin/perl

When a script begins with a line, as in the previous example, and the executable permissions are set, you can specify the line as the command to run for a Cron Job.

The PHP (versions 4 and 5) hosting installations do not support the use of the executable line in scripts. To run a PHP script with Cron, you must set the path to the PHP interpreter as the first element of the command, and then enter the full path of the script you want to run.

The full path to the PHP executables are:


    PHP version 4: /web/cgi-bin/php

    PHP version 5: /web/cgi-bin/php5

    PHP version 5.3: /web/cgi-bin/php5_3


For more information, see Accessing Your Cron Job Manager with Shared Hosting.

If we can help you in any other way, please let us know.

Sincerely,
James P.
Professional Hosting Support

As we value your feedback about the service you received, please take a moment to complete the short survey linked at the bottom of this email.
LinuxPHPMySQL Server

Avatar of undefined
Last Comment
rgb192
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of rgb192
rgb192
Flag of United States of America image

ASKER

many lines of
Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\Users\Acer\Documents\NuSphere PhpED\Projects\noname295.php on line 122

and then message of file creation at /backup folder

but backup folder was not created

so I create backup folder and then sql file was created. Thanks


I will verify by creating a new database on local host

Thank you.
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo