Remove SQL dump file

master
Florian Charlaix 7 months ago
parent d7c55a5f95
commit 703d99adec
  1. 3
      nextcloud_backup.py

@ -5,7 +5,7 @@ from logging import getLogger, basicConfig, DEBUG, INFO, WARN, ERROR, CRITICAL
from subprocess import CompletedProcess, run, PIPE, CalledProcessError from subprocess import CompletedProcess, run, PIPE, CalledProcessError
from json import loads from json import loads
from tempfile import NamedTemporaryFile, _TemporaryFileWrapper from tempfile import NamedTemporaryFile, _TemporaryFileWrapper
from os import environ, access, X_OK from os import environ, access, X_OK, unlink
from argparse import ArgumentParser, BooleanOptionalAction, ArgumentTypeError from argparse import ArgumentParser, BooleanOptionalAction, ArgumentTypeError
from pathlib import Path from pathlib import Path
from typing import Optional, Any, Dict from typing import Optional, Any, Dict
@ -369,6 +369,7 @@ class NextcloudBackup:
dump_file = self.dump_db() dump_file = self.dump_db()
self.copy_db(dump_file.name) self.copy_db(dump_file.name)
unlink(dump_file.name)
self.copy_s3(rclone_remote_control) self.copy_s3(rclone_remote_control)

Loading…
Cancel
Save