Explorer
/proc/thread-self/root/tmp/aa002_backup.py
← Zurück ↓ Download
import sqlite3, sys, os
src='/opt/struktur/youtube-research/knowledge.db'
dst=sys.argv[1]
os.makedirs(os.path.dirname(dst), exist_ok=True)
with sqlite3.connect(f'file:{src}?mode=ro', uri=True) as a, sqlite3.connect(dst) as b:
    a.backup(b)
    b.commit()
print(dst)