v0.43.1
This commit is contained in:
1 parent
5b6d4a7903
commit
4d1087e357
160 files changed
+2407
-1933
No files matched your search
@@ -16,7 +16,6 @@ import stat
|
||||
import time
|
||||
from urllib.parse import quote
|
||||
|
||||
|
||||
def backup(data_dir: Path, destination: Path) -> Path:
|
||||
os.umask(0o077)
|
||||
if data_dir.is_symlink() or not data_dir.is_dir():
|
||||
@@ -28,7 +27,6 @@ def backup(data_dir: Path, destination: Path) -> Path:
|
||||
raise ValueError("config.sqlite3 must be a regular, existing file.")
|
||||
destination.mkdir(mode=0o700, parents=False, exist_ok=False)
|
||||
target = destination / "config.sqlite3"
|
||||
# The online backup API incorporates committed WAL contents; a plain file copy does not.
|
||||
reader = sqlite3.connect(f"file:{quote(str(source.resolve()), safe='/')}?mode=ro", uri=True, timeout=10)
|
||||
writer = sqlite3.connect(target)
|
||||
try:
|
||||
@@ -85,13 +83,11 @@ def backup(data_dir: Path, destination: Path) -> Path:
|
||||
(destination / "backup.json").write_text(json.dumps(metadata, indent=2) + "\n", encoding="utf-8")
|
||||
return target
|
||||
|
||||
|
||||
def main() -> None:
|
||||
raise SystemExit(
|
||||
"tools/legacy/backup.py is retired for operator backups. "
|
||||
"Use: rust-proxy --data-dir <data-dir> backup create --output <backup.rpb>"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user