fix bdd save location
This commit is contained in:
parent
b1cc817777
commit
3214f5f6e6
19
main.py
19
main.py
@ -20,28 +20,23 @@ print(key)
|
||||
# application_key = 'K003RNvGfy+pazc6pD97xuUzPcDEqS0'
|
||||
# bucket_id = '6a1a9000075465fe7cc4021a'
|
||||
|
||||
save_location = "crypted"
|
||||
|
||||
bdd_location = os.path.abspath("bdd.db")
|
||||
exported_bdd = os.path.join("crypted", "0".zfill(ZFILL))
|
||||
exported_bdd = os.path.join(save_location, "0".zfill(ZFILL))
|
||||
if os.path.exists(exported_bdd):
|
||||
print("Reload BDD from", exported_bdd)
|
||||
backup.save(backup.uncrypt(exported_bdd, key), bdd_location)
|
||||
|
||||
#bck = Backup().backblaze(key, bdd=bdd, app_key_id=application_key_id, app_key=application_key, bucket_id=bucket_id)
|
||||
bck = Backup().local(key, bdd=bdd_location, save_location="crypted")
|
||||
bck = Backup().local(key, bdd=bdd_location, save_location=save_location)
|
||||
|
||||
bck.check("/home/lionel/Images", recurse=False)
|
||||
bck.clear("/home/lionel/Images", recurse=False)
|
||||
bck.save("/home/lionel/Images", recurse=False)
|
||||
#bck.check("/home/lionel/Images", recurse=True)
|
||||
bck.update("/home/lionel/Images", recurse=True)
|
||||
|
||||
exported_bdd = os.path.join("crypted", "0".zfill(ZFILL))
|
||||
exported_bdd = os.path.join(save_location, "0".zfill(ZFILL))
|
||||
print("Save BDD on", exported_bdd)
|
||||
backup.save(backup.crypt(bdd_location, key), exported_bdd)
|
||||
os.remove(bdd_location)
|
||||
#os.remove(bdd_location)
|
||||
|
||||
# rootdir = "test"
|
||||
# bck.clear(rootdir, recurse=False)
|
||||
# bck.save(rootdir)
|
||||
# bck.update(rootdir)
|
||||
#
|
||||
# bck.recover_file(paths=["test\\tmp597556213336506368.jpg", "share/archive.tar"], save_path="recovered")
|
||||
|
Loading…
x
Reference in New Issue
Block a user