explicitly declared additional_filestorages raise IOError (seems to treat blobstorage as though it had an additional .fs file)
pigeonflight opened this issue · 3 comments
The following is my configuration::
[backup]
recipe = collective.recipe.backup
fstorage = ${buildout:directory}/var/filestorage
bstorage = ${buildout:directory}/var/blobstorage
additional_filestorages =
demo ${backup:fstorage}/demo/demo.fs ${backup:bstorage}-demo
The var/filestorage/demo/demo.fs file and var/blobstorage-demo folder both exist, and what I expect to happen is that they get backedup, instead when I run bin/backup
it insists on attempting to back up a file called /home/plone/plone.4.2.buildout/var/blobstorage-demo.fs
INFO: Backing up database file: /home/plone/plone.4.2.buildout/var/filestorage/demo /home/plone/plone.4.2.buildout/var/filestorage/demo/demo.fs /home/plone/plone.4.2.buildout/var/blobstorage-demo.fs to /home/plone/plone.4.2.buildout/var/backups_demo /home/plone/plone.4.2.buildout/var/filestorage/demo/demo.fs /home/plone/plone.4.2.buildout/var/blobstorage-demo...
Traceback (most recent call last):
File "/home/plone/plone.4.2.buildout/bin/repozo", line 18, in <module>
ZODB.scripts.repozo.main()
File "/home/plone/plone.4.2.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/scripts/repozo.py", line 611, in main
do_backup(options)
File "/home/plone/plone.4.2.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/scripts/repozo.py", line 500, in do_backup
do_full_backup(options)
File "/home/plone/plone.4.2.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/scripts/repozo.py", line 436, in do_full_backup
fs = FileStorage(options.file, read_only=True)
File "/home/plone/plone.4.2.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 167, in __init__
self._file = open(file_name, 'w+b')
IOError: [Errno 2] No such file or directory: '/home/plone/plone.4.2.buildout/var/filestorage/demo /home/plone/plone.4.2.buildout/var/filestorage/demo/demo.fs /home/plone/plone.4.2.buildout/var/blobstorage-demo.fs'
INFO: Backing up database file: /home/plone/plone.4.2.buildout/var/filestorage/Data.fs to /home/plone/plone.4.2.buildout/var/backups...
So far I have only experienced this issue when the path to the additional filestorages is explicitly declared.
Somehow the script expects that this is one filename:
'/home/plone/plone.4.2.buildout/var/filestorage/demo /home/plone/plone.4.2.buildout/var/filestorage/demo/demo.fs /home/plone/plone.4.2.buildout/var/blobstorage-demo.fs'
This is when running the bin/backup
command? No extra command line options given?
Which version of the recipe are you using? I see that INFO: Backing up database file
is printed, where the current recipe prints INFO: Please wait while backing up database file
, so it could be that you are using an earlier version. The additional_filestorages option has changed in version 2.7. I think it is backwards compatible, but perhaps not.
Pinging @mamico as he did changes there.
Hi David,
I replicated your error using c.r.backup prior to 2.7. As Maurits has suggested, please double check your recipe and pin the version to 2.7 (or newer)
[versions]
collective.recipe.backup = 2.7
or
[backup]
recipe = collective.recipe.backup == 2.7
... we tried to make c.r.backup 2.7 backwards compatible, but anyway c.r.backup < 2.7 cannot be "forward" compatible to newer syntax.
I hope this may help you.
The conclusion is still: use version 2.7 or later of the recipe. Latest version is 2.8 and I will shortly release 2.9.