Add no-syslog option
This commit is contained in:
parent
ffbf8ece91
commit
d6d9fbf6e4
@ -56,6 +56,9 @@ Same as rsync option \(aq\-\-checksum\(aq, use checksums instead of mod\-time an
|
|||||||
.B \-\-remove\-before\-backup
|
.B \-\-remove\-before\-backup
|
||||||
Remove old backups (if necessary) before creating the new backup. Useful to free some space before performing the backup.
|
Remove old backups (if necessary) before creating the new backup. Useful to free some space before performing the backup.
|
||||||
Default behavior is to remove old backups after successfully completing the backup.
|
Default behavior is to remove old backups after successfully completing the backup.
|
||||||
|
.TP
|
||||||
|
.B \-\-no\-syslog
|
||||||
|
Don't use systemd journal for logging
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
An example configuration file is provided at \(aq/etc/simple_backup/simple_backup.conf\(aq. Copy it to the default location
|
An example configuration file is provided at \(aq/etc/simple_backup/simple_backup.conf\(aq. Copy it to the default location
|
||||||
($HOME/.config/simple_backup) and edit it as needed.
|
($HOME/.config/simple_backup) and edit it as needed.
|
||||||
|
@ -252,6 +252,7 @@ def _parse_arguments():
|
|||||||
help='Use checksum rsync option to compare files (MUCH SLOWER)')
|
help='Use checksum rsync option to compare files (MUCH SLOWER)')
|
||||||
parser.add_argument('--remove-before-backup', action='store_true',
|
parser.add_argument('--remove-before-backup', action='store_true',
|
||||||
help='Remove old backups before executing the backup, instead of after')
|
help='Remove old backups before executing the backup, instead of after')
|
||||||
|
parser.add_argument('--no-syslog', action='store_true', help='Disable systemd journal logging')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -297,6 +298,13 @@ def notify(text):
|
|||||||
|
|
||||||
def simple_backup():
|
def simple_backup():
|
||||||
args = _parse_arguments()
|
args = _parse_arguments()
|
||||||
|
|
||||||
|
if args.no_syslog:
|
||||||
|
try:
|
||||||
|
logger.removeHandler(j_handler)
|
||||||
|
except NameError:
|
||||||
|
pass
|
||||||
|
|
||||||
inputs, output, exclude, keep = _read_config(args.config)
|
inputs, output, exclude, keep = _read_config(args.config)
|
||||||
|
|
||||||
if args.input is not None:
|
if args.input is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user