[英]SQLite database backup
For backup of SQLite database, I went through https://www.sqlite.org/backup.html I came to know that there is one python wrapper over these SQLite online backup APIs.So, I went through https://github.com/husio/python-sqlite3-backup Here are some doubts that I have about sqlitebck(python package) 为了备份SQLite数据库,我经历了https://www.sqlite.org/backup.html,我知道这些SQLite在线备份API上有一个python包装器,因此,我经历了https:// github。 com / husio / python-sqlite3-backup这是我对sqlitebck(python软件包)有的疑问
':memory:'
as a "filename" is how you tell sqlite to keep a small DB in memory rather than on-disk. ':memory:'
作为“文件名”是您告诉sqlite如何在内存中而不是磁盘上保留一个小的DB。 But yes, sqlitebck
is fine to copy from file to file -- though the arguments it takes are sqlite connections so you'd need to sqlite3.connect
to each file first (and usually might as well just copy the file directly w/o involving sqlite
-- as the sqlite page you link to implies, suggesting Unix cp
or Windows copy
... Python has its own standard library module for file copies, https://docs.python.org/2/library/shutil.html ). 但是是的,
sqlitebck
可以从一个文件复制到sqlitebck
文件-尽管需要使用的参数是sqlite 连接,所以您需要先sqlite3.connect
到每个文件(通常也可以直接复制文件,而无需sqlite
链接到的sqlite页面暗示,建议使用Unix cp
或Windows copy
... Python有自己的文件复制标准库模块, https://docs.python.org/2/library/shutil.html ) 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.