def __init__(self, machine_output, skip_header, human_readable, Config): self.machine_output = machine_output self.skip_header = skip_header self.human_readable = human_readable self.Config = Config self.backy = backy_from_config(Config)
simultaneous_reads: 20 #bandwidth_read: 78643200 #bandwidth_write: 78643200 [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)(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')
engine: sqlite:///{testpath}/backy.sqlite [DataBackend] type: backy2.data_backends.file 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
def __init__(self, machine_output, Config): self.machine_output = machine_output self.Config = Config self.backy = backy_from_config(Config)
simultaneous_writes: 5 bandwidth_read: 100000 bandwidth_write: 100000 [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