mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
option to skip database syncs entirely
This commit is contained in:
parent
9b0f519e4e
commit
fbed322d3b
|
@ -542,6 +542,8 @@ def run_argparse(
|
|||
\033[36mnoforget$\033[35m don't forget files when deleted from disk
|
||||
\033[36mnowal\033[35m guarantee zero dataloss on powerloss by disabling wal
|
||||
\033[36mwal\033[35m enable wal (default; overrides --no-wal)
|
||||
\033[36mnosync\033[35m switch to unsafe mode for extremely fast uploads
|
||||
\033[36msync\033[35m normal corruption-protected db config
|
||||
\033[36mxlink$\033[35m cross-volume dupe detection / linking
|
||||
\033[36mxdev\033[35m do not descend into other filesystems
|
||||
\033[36mxvol\033[35m skip symlinks leaving the volume root
|
||||
|
@ -816,6 +818,7 @@ def run_argparse(
|
|||
ap2.add_argument("--no-dhash", action="store_true", help="disable rescan acceleration; do full database integrity check -- makes the db ~5%% smaller and bootup/rescans 3~10x slower")
|
||||
ap2.add_argument("--no-forget", action="store_true", help="never forget indexed files, even when deleted from disk -- makes it impossible to ever upload the same file twice (volflag=noforget)")
|
||||
ap2.add_argument("--no-wal", action="store_true", help="1%% faster searches, more reliable upload performance, and slightly more resistant to dataloss, but makes uploads up to 2x slower (volflag=nowal)")
|
||||
ap2.add_argument("--no-sync", action="store_true", help="make uploads extremely fast, but removes corruption protection -- if the OS crashes, you might lose the db (volflag=nosync)")
|
||||
ap2.add_argument("--xlink", action="store_true", help="on upload: check all volumes for dupes, not just the target volume (volflag=xlink)")
|
||||
ap2.add_argument("--xdev", action="store_true", help="do not descend into other filesystems (symlink or bind-mount to another HDD, ...) (volflag=xdev)")
|
||||
ap2.add_argument("--xvol", action="store_true", help="skip symlinks leaving the volume root (volflag=xvol)")
|
||||
|
|
|
@ -1124,6 +1124,7 @@ class AuthSrv(object):
|
|||
("no_forget", "noforget"),
|
||||
("no_dupe", "nodupe"),
|
||||
("no_wal", "nowal"),
|
||||
("no_sync", "nosync"),
|
||||
("magic", "magic"),
|
||||
("xlink", "xlink"),
|
||||
):
|
||||
|
|
|
@ -666,6 +666,9 @@ class Up2k(object):
|
|||
except:
|
||||
pass
|
||||
|
||||
if "nosync" in flags:
|
||||
cur.execute("pragma synchronous=0")
|
||||
|
||||
return cur, db_path
|
||||
except:
|
||||
msg = "cannot use database at [{}]:\n{}"
|
||||
|
|
|
@ -202,7 +202,7 @@ if ANYWIN:
|
|||
UNPLICATIONS = [["no_dav", "daw"]]
|
||||
|
||||
|
||||
DROPLICATIONS = [["wal", "nowal"]]
|
||||
DROPLICATIONS = [["wal", "nowal"], ["sync", "nosync"]]
|
||||
|
||||
|
||||
MIMES = {
|
||||
|
|
Loading…
Reference in a new issue