Fixed DB utils
This commit is contained in:
parent
da2a4d5786
commit
428fd1fe28
@ -3,8 +3,8 @@ import sys, sqlite3
|
|||||||
def progress(status, remaining, total):
|
def progress(status, remaining, total):
|
||||||
print(f'Copied {total-remaining} of {total} pages...')
|
print(f'Copied {total-remaining} of {total} pages...')
|
||||||
|
|
||||||
con = sqlite3.connect('sys.argv[1]')
|
con = sqlite3.connect(sys.argv[1])
|
||||||
bck = sqlite3.connect('sys.argv[2]')
|
bck = sqlite3.connect(sys.argv[2])
|
||||||
with bck:
|
with bck:
|
||||||
con.backup(bck, pages=1, progress=progress)
|
con.backup(bck, pages=1, progress=progress)
|
||||||
bck.close()
|
bck.close()
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import sys, sqlite3
|
|||||||
def progress(status, remaining, total):
|
def progress(status, remaining, total):
|
||||||
print(f'Copied {total-remaining} of {total} pages...')
|
print(f'Copied {total-remaining} of {total} pages...')
|
||||||
|
|
||||||
con = sqlite3.connect('sys.argv[2]')
|
con = sqlite3.connect(sys.argv[2])
|
||||||
bck = sqlite3.connect('sys.argv[1]')
|
bck = sqlite3.connect(sys.argv[1])
|
||||||
with bck:
|
with bck:
|
||||||
con.backup(bck, pages=1, progress=progress)
|
con.backup(bck, pages=1, progress=progress)
|
||||||
bck.close()
|
bck.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user