Rudd-O / zfs-tools

ZFS synchronization and snapshotting tools
79 stars 41 forks source link

AttributeError: 'Snapshot' object has no attribute 'get_creation' #15

Closed jefft closed 8 years ago

jefft commented 8 years ago

Hi,

I'm trying to back up my ZFS to an external disk. Following the sequence in the README:

zfs create tank/foo
zfs create zextbackup/foo
zreplicate tank/foo zextbackup/foo
zsnap tank/foo
zreplicate tank/foo zextbackup/foo

The last step blows up with:

jturner-desktop ~ # zreplicate tank/foo zextbackup/foo
Traceback (most recent call last):
  File "/usr/local/bin/zreplicate", line 5, in <module>
    pkg_resources.run_script('zfs-tools==0.4.3', 'zreplicate')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/zfs_tools-0.4.3-py2.7.egg/EGG-INFO/scripts/zreplicate", line 114, in <module>
    operation_schedule = recursive_replicate(source_dataset,destination_dataset)
  File "/usr/local/lib/python2.7/dist-packages/zfs_tools-0.4.3-py2.7.egg/zfstools/sync.py", line 19, in recursive_replicate
    all_snapshots = [ y[1] for y in sorted([ (x.get_creation(), x.name) for x in all_snapshots ]) ]
AttributeError: 'Snapshot' object has no attribute 'get_creation'

It seems that the get_creation() method doesn't exist. This is the case in the 0.4.3 release and git. Am I doing anything wrong?

Rudd-O commented 8 years ago

Fixed in latest master (v0.4.4).