Search the Community
Showing results for tags 'Backup'.
-
Could you recommend or suggest a dependable solution for a quick and easy full website and database backup/restore.
-
i have a script to be ran by a cron job to backup a db weekly here is the script.... // configure your database variables below:$dbhost = 'localhost'; // Server address of your MySQL Server$dbuser = 'yourcpanelname_dbuser'; // Username to access MySQL database$dbpass = 'dbuserpassword'; // Password to access MySQL database$dbname = 'yourcpanelname_dbname'; // Database Name// Optional Options You May Optionally Configure$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"// Configure the path that this script resides on your server.$savepath = "/home/yourcpanelname/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@a-valid-domain.com"; // Who to send the emails to - you can also use a GMail address$from = "you@a-valid-domain.com"; // Who should the emails be sent from?$senddate = date("j F Y");$subject = "MySQL Database Backup - $senddate"; // Subject in the email to be sent. - you can change this$message = "Your MySQL database has been backed up and is attached to this email"; // Brief Message. - you can change this my question is...how do i get this to just send the DB backup to my email and not save it on the server?