path: {testpath} simultaneous_writes: 5 [NBD] cachedir: /tmp [Reader] type: backy2.readers.file simultaneous_reads: 5 """.format(testpath=testpath) Config = partial(_Config, cfg=config) backy = backy_from_config(Config)() version_uid = backy.backup( 'data-backup', os.path.join(testpath, 'data'), hints_from_rbd_diff(open(os.path.join(testpath, 'hints')).read()), from_version ) version_uids.append(version_uid) try: assert backy.scrub(version_uid) == True print(' Scrub successful') assert backy.scrub(version_uid, os.path.join(testpath, 'data')) == True print(' Deep scrub successful') backy.restore(version_uid, os.path.join(testpath, 'restore'), sparse=False) assert same(os.path.join(testpath, 'data'), os.path.join(testpath, 'restore')) == True print(' Restore successful') except AssertionError: import pdb; pdb.set_trace()
cachedir: /tmp [io_file] simultaneous_reads: 5 [io_rbd] ceph_conffile: /etc/ceph/ceph.conf simultaneous_reads: 10 """.format(testpath=testpath) Config = partial(_Config, cfg=config) backy = backy_from_config(Config)(initdb=initdb) initdb = False version_uid = backy.backup( 'data-backup', 'snapshot-name', 'file://' + os.path.join(testpath, 'data'), from_version and hints_from_rbd_diff( open(os.path.join(testpath, 'hints')).read()) or None, from_version) backy.close() version_uids.append(version_uid) try: backy = backy_from_config(Config)() assert backy.scrub(version_uid) == True backy.close() print(' Scrub successful') backy = backy_from_config(Config)() assert backy.scrub(version_uid, 'file://' + os.path.join(testpath, 'data')) == True backy.close() print(' Deep scrub successful') backy = backy_from_config(Config)()
[NBD] cachedir: /tmp [io_file] simultaneous_reads: 5 [io_rbd] ceph_conffile: /etc/ceph/ceph.conf simultaneous_reads: 10 """.format(testpath=testpath) Config = partial(_Config, cfg=config) backy = backy_from_config(Config)() version_uid = backy.backup( 'data-backup', 'file://' + os.path.join(testpath, 'data'), hints_from_rbd_diff(open(os.path.join(testpath, 'hints')).read()), from_version) backy.close() version_uids.append(version_uid) try: backy = backy_from_config(Config)() assert backy.scrub(version_uid) == True backy.close() print(' Scrub successful') backy = backy_from_config(Config)() assert backy.scrub(version_uid, 'file://' + os.path.join(testpath, 'data')) == True backy.close() print(' Deep scrub successful') backy = backy_from_config(Config)()