--- /dev/null
+#!/usr/bin/python
+# Backups all zope instances (any versions)
+#
+# Depends : zope_instance.py
+# Copyright (C) 2007 Guillaume Pellerin
+
+import os
+import sys
+from zope_instance import *
+
+version = '0.1'
+info = 'zope_backup v'+version+'\n'+
+ """Usage: zope_backup DIRECTORY
+ where DIRECTORY is the folder where you want to backup
+ the instances of the different versions of zope."""
+
+if len(sys.argv) < 2:
+ sys.exit(info)
+else :
+ backup_dir = sys.argv[1]
+
+z = ZopeInstall()
+instances = z.get_instances()
+instance_main_dir = z.instance_main_dir
+
+def backup_all():
+ for version in instances:
+ for instance in instances[version]:
+ z = ZopeInstance(version, instance)
+ print z.get_instance_dir()
+ z.backup(backup_dir)
+ print version + ': ' + instance + ' backuped !'
+
+if __name__ == '__main__':
+ backup_all()
+ print "Backup_all Zopes done !"
+
+
+
# Backups all zope instances (any versions)
#
# Depends : zope_instance.py
+# Copyright (C) 2007 Guillaume Pellerin
import os
import sys
from zope_instance import *
+version = '0.1'
+info = 'zope_backup v'+version+'\n'+
+ """Usage: zope_backup DIRECTORY
+ where DIRECTORY is the folder where you want to backup
+ the instances of the different versions of zope."""
-backup_dir = '/home/momo/backups/zope/'
+if len(sys.argv) < 2:
+ sys.exit(info)
+else :
+ backup_dir = sys.argv[1]
z = ZopeInstall()
instances = z.get_instances()