Quote:
Originally Posted by otheus
You don't need to use --opt since it's enabled by default. 8000 items is not a lot. The "quick" option will not defeat the purpose of using bs=1M.
|
Thanks so much for your help. I'm trying to test this out on my personal live website's wordpress database first. so I uploaded a test.php file to run the shell script, like so:
test.php
Code:
<?php
$output=shell_exec('sh /home/jzacsh/public_html/private/scripts/dbackup.sh');
echo "<pre>$output</pre>";
?>
the shell script its set to run is:
Code:
#!/bin/sh
sql_bDir=./sql_pickup/
#START SQL BACKUP + TGZ
echo " " #VISUAL PADDING
echo "# BEGINNING DATABASE BACKUP PORTION:" #VISUAL
#MYSQL LANDING DIR. CHECK
echo "Checking if sql backup landing directory exists: $sql_bDir"
if test -d "$sql_bDir"
then
echo "Directory to receive database backup exists"
else
echo "Directory to receive database backup does not exist, creating it"
mkdir $sql_bDir
fi #ENDIF SQL DIR. CHECK
echo " " #VISUAL PADDING
# MYSQL BACKUP
sql_bName=SQLBackUp_$(date +%A).gz
sql_Path=$sql_bDir$sql_bName
echo "The Shopping Cart's database backup will be:" $sql_Path #NOTICE OF DATABASE BACKUP
echo "Note: If the main backup is backing up the root directory, you do not need to separately download the database backup."
mysqldump -u name -p wppass --single-transaction db123 | dd bs=1M | gzip -c > $sql_Path
then I visit the above ^ test.php via browser and get this output:
Code:
# BEGINNING DATABASE BACKUP PORTION:
Checking if sql backup landing directory exists: ./sql_pickup/
Directory to receive database backup exists
The Shopping Cart's database backup will be: ./sql_pickup/SQLBackUp_Tuesday.gz
Note: If the main backup is backing up the root directory, you do not need to separately download the database backup.
When I download the file its only 4KB, and upon unarchiving the file, I find a Zero KB file, which using "cat" via terminal shows that the file is indeed blank.
Any ideas what I could be doing wrong??