Hi

> > > Here's a patch to hot-backup, then.
> Donald, this mailing list unfortunately strips off some kinds of
> attachments.  Please try attaching as plain text, or even paste in-line
> text if it's a very small patch.

Attached, again: hopefully the list lets text/plain through.

donald
Index: hot-backup.py.in
===================================================================
--- hot-backup.py.in    (revision 955063)
+++ hot-backup.py.in    (working copy)
@@ -53,7 +53,8 @@
 archive_map = {
   'gz'  : ".tar.gz",
   'bz2' : ".tar.bz2",
-  'zip' : ".zip"
+  'zip' : ".zip",
+  'zip64' : ".zip"
   }
 
 # Chmod recursively on a whole subtree
@@ -100,9 +101,10 @@
 
 Options:
   --archive-type=FMT Create an archive of the backup. FMT can be one of:
-                       bz2 : Creates a bzip2 compressed tar file.
-                       gz  : Creates a gzip compressed tar file.
-                       zip : Creates a compressed zip file.
+                       bz2  : Creates a bzip2 compressed tar file.
+                       gz   : Creates a gzip compressed tar file.
+                       zip  : Creates a compressed zip file.
+                       zip64: Creates a zip64 file (can be > 2GB).
   --num-backups=N    Number of prior backups to keep around (0 to keep all).
   --help      -h     Print this help message and exit.
 
@@ -284,7 +286,7 @@
       err_msg = "Tar failed: " + str(e)
       err_code = -3
 
-  elif archive_type == 'zip':
+  elif archive_type == 'zip' or archive_type == 'zip64':
     try:
       import zipfile
       
@@ -299,7 +301,7 @@
             for dirpath, dirs, files in os.walk(path):
               add_to_zip(zp, path, dirpath, dirs + files)
             
-      zp = zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED)
+      zp = zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED, 
archive_type == 'zip64')
       for dirpath, dirs, files in os.walk(backup_subdir):
         add_to_zip(zp, backup_dir, dirpath, dirs + files)
       zp.close()

Reply via email to