python - 使用口是心非上传到 Swift 伪文件夹

标签 python openstack-swift duplicity

我正在尝试使用口是心非将文件备份到 RunAbove 提供的 Swift 对象存储服务。容器的名称是“backup”,它有一个名为“web”的伪文件夹,我想在其中放置备份。

口是心非的版本:0.6.24
Python版本:2.7.3
python-keystoneclient 1.0.0
python-swiftclient 2.3.1

设置必要的环境变量后,我尝试了以下命令:

duplicity --no-encryption /var/www swift://backup/web/

返回以下错误:

Listing of 'backup/web/' failed (attempt 1): JSONDecodeError: Expecting value: line 1 column 1 (char 0)

然后我尝试了:

duplicity --no-encryption --file-prefix web/ /var/www swift://backup

返回 python 错误:

Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
No signatures found, switching to full backup.
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1509, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1503, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1352, in main
do_backup(action)
File "/usr/bin/duplicity", line 1478, in do_backup
full_backup(col_stats)
File "/usr/bin/duplicity", line 545, in full_backup
globals.backend)
File "/usr/bin/duplicity", line 420, in write_multivol
sig_outfp.to_partial()
File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 168, in to_partial
self.tdp.rename(self.dirpath.append(self.partname))
File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 612, in rename
os.rename(self.name, new_path.name)
OSError: [Errno 2] No such file or directory

如何使用口是心非将文件备份到 OpenStack Swift 中的伪文件夹?

最佳答案

此问题已在 duplicity v0.7.08 中修复(参见 http://duplicity.nongnu.org/CHANGELOG)

  • Merged in lp:~ghoz/duplicity/swift-prefix
    • adds the abiliy to use path in the swift backend, in order to have multiple backups to the same container neatly organized.

关于python - 使用口是心非上传到 Swift 伪文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27991960/

相关文章:

python - 多重索引的滚动级别

python - 在python中,比较元素中的两个数组并将较低的值更改为零

Python IO错误: invalid mode: w - my procedure can't write on external file

python - 多个文件比较

openstack - Rackspace CloudFile API - 获取对象信息

backup - 口是心非地只恢复更改过的文件

amazon-s3 - 口是心非 "no module named dropbox"错误

amazon-s3 - 双重性,亚马逊S3后端异常

security - Amazon S3 存储桶策略在 OpenStack Swift 世界中是否等效?