<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,7 @@ define('awsAccessKey', '');
 define('awsSecretKey', '');
 define('awsBucket', '');
 define('debug',false);
+ini_set('date.timezone', 'America/Los_Angeles');
 
 //Pass these options to mysqldump
 define('mysqlDumpOptions', '--quote-names --quick --add-drop-table --add-locks --allow-keywords --disable-keys --extended-insert --single-transaction --create-options --comments --net_buffer_length=16384');</diff>
      <filename>backup.dist.php</filename>
    </modified>
    <modified>
      <diff>@@ -24,13 +24,25 @@ function backupFiles($targets, $prefix = '') {
   
   foreach ($targets as $target) {
     
+    if (debug == true) {
+      echo &quot;Backing up: $target\n&quot;;
+    }
+    
     if (strpos($target,'/') === 0) {
       $target = strrev(rtrim(strrev($target),'/'));
     }
     
+    if (debug == true) {
+      echo &quot;Relative from root: $target\n&quot;;
+    }
+    
     // compress local files
     $cleanTarget = urlencode($target);
     `tar -cjf &quot;$prefix-$cleanTarget.tar.bz2&quot; -C / &quot;$target&quot;`;
+    
+    if (debug == true) {
+      echo &quot;Backing up to: &quot;.s3Path($prefix,&quot;/&quot;.$target.&quot;-backup.tar.bz2&quot;).&quot;\n&quot;;
+    }
 
     // upload to s3
     $s3-&gt;putObjectFile(&quot;$prefix-$cleanTarget.tar.bz2&quot;,awsBucket,s3Path($prefix,$target.&quot;-backup.tar.bz2&quot;));
@@ -91,7 +103,7 @@ function deleteHourlyBackups($target_prefix) {
   if (hourly) {
     for ($i = 1; $i &lt;= 23; $i++) {
       $prefix = s3Path('','',$set_date,true).$target_prefix.&quot;/&quot;.str_pad((string)$i,2,&quot;0&quot;,STR_PAD_LEFT).&quot;/&quot;;
-      if (debug) echo $prefix.&quot;\n&quot;;
+      if (debug == true) echo $prefix.&quot;\n&quot;;
       deletePrefix($prefix);
     }
   }
@@ -109,7 +121,7 @@ function deleteBackups() {
   //set s3 &quot;dir&quot; to delete
   $prefix = s3Path('','',$set_date,false);
   
-  if (debug) echo $prefix.&quot;\n&quot;;
+  if (debug == true) echo &quot;Deleting: &quot;.$prefix.&quot;\n&quot;;
   
   //delete each key found
   deletePrefix($prefix);
@@ -120,7 +132,7 @@ function deleteBackups() {
   //only if it wasn't a saturday or the 1st
   if ((int)date('j',$set_date) === 1 || (string)date('l',$set_date) === &quot;Saturday&quot;) return true;
   $prefix = s3Path('','',$set_date,false);
-  if (debug) echo $prefix.&quot;\n&quot;;
+  if (debug == true) echo &quot;Deleting: &quot;.$prefix.&quot;\n&quot;;
   
   deletePrefix($prefix);
 }
@@ -132,7 +144,7 @@ function deletePrefix($prefix) {
   $keys = $s3-&gt;getBucket(awsBucket,$prefix);
   
   foreach ($keys as $key =&gt; $meta) {
-    if (debug) echo $key.&quot;\n&quot;;
+    if (debug == true) echo $key.&quot;\n&quot;;
     $s3-&gt;deleteObject(awsBucket,$key);
   }
 }</diff>
      <filename>include/backup.inc.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4e0140816ee76424aaaf8bfbd7f536675abf3fe3</id>
    </parent>
  </parents>
  <author>
    <name>Ian Neubert</name>
    <email>ian@ianneubert.com</email>
  </author>
  <url>http://github.com/ianneub/php_backup_s3/commit/a1cc94e34cade3f9050f5b6d0bd1601fd9db9ed1</url>
  <id>a1cc94e34cade3f9050f5b6d0bd1601fd9db9ed1</id>
  <committed-date>2009-10-31T16:51:42-07:00</committed-date>
  <authored-date>2009-10-31T16:51:42-07:00</authored-date>
  <message>Added more debug output.
Fixed bug where files uploaded to a file named as the server, instead of in a folder of the server name.
Added timezone to config file.</message>
  <tree>9d20abaa53499410ce2f6bdeeabe4b7d8daad51d</tree>
  <committer>
    <name>Ian Neubert</name>
    <email>ian@ianneubert.com</email>
  </committer>
</commit>
