From 906c3f1fa0a22f016b9eaea06a6b43ffe79e9aa6 Mon Sep 17 00:00:00 2001 From: Alex Sears Date: Wed, 20 Nov 2013 16:06:45 -0500 Subject: [PATCH] Fixed errors from move to AWS SDK 2. --- backup_and_upload_to_s3.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/backup_and_upload_to_s3.php b/backup_and_upload_to_s3.php index 69cb266..b5d7370 100644 --- a/backup_and_upload_to_s3.php +++ b/backup_and_upload_to_s3.php @@ -25,7 +25,7 @@ 'local_backup_days' => 5, 'home_dir' => '/path/to/home/directory', 's3_key' => 'OMGTHISISMYKEY', - 's3_secret' => 'PLEASEDONTSHARETHISSECRETKEYWITHANYONE', + 's3_secret' => 'PLEASEDONTSHARETHISSECRETKEYWITHANYONE', // must have trailing forward slash 'bucket' => 'mr-bucket-rules', 'chunk_size_in_MB' => 10, 'remote_backup_days' => 10 @@ -65,7 +65,7 @@ // backup_dir/mysql/db_backup_dbname_0000_00_00_00:00:00.bak.gz $path = $mysql_backup_dir . 'db_backup_' . - escapeshellarg($details['db_name']) . '_' . $date . '.bak.gz'; + escapeshellarg($details['db_name']) . '_' . $date . '.bak.sql.gz'; // mysqldump -h host.example.com -u user -ppassword dbname | gzip > path $command = 'mysqldump -h ' . escapeshellarg($details['db_host']) . @@ -187,10 +187,6 @@ echo PHP_EOL; -$parts = $s3->list_parts($bucket, $upload_file_name, $upload_id); -$response = $s3->complete_multipart_upload($bucket, $upload_file_name, $upload_id, - $parts); - // release resources fclose($file); @@ -208,7 +204,6 @@ // will return 1000 results (if there are that many) $iterator = $s3->getIterator('ListObjects', array( 'Bucket' => $bucket, - 'Prefix' => $config['backup_prefix'] . '_' )); // essentially I am using the DateTime class to parse the string I get back