diff --git a/rbackup/script.py b/rbackup/script.py index 927e7f1..173fdfa 100644 --- a/rbackup/script.py +++ b/rbackup/script.py @@ -25,15 +25,19 @@ syslog = logging.getLogger(__name__) def do_backup(repository, parsed_config, args, extra_rsync_opts=None): """Run a backup operation. - It is up to the caller to decide on how to instantiate the Repository object. + A backup operation requires a repository, config options to read from, and the + arguments that were passed when the script was started. + + It is up to the caller to decide on how to instantiate the ``Repository`` object. :param repository: repository to operate on :type repository: ``rbackup.struct.repository.Repository`` object - :param parsed_config: + :param parsed_config: config file parser :type parsed_config: ``configparser.ConfigParser`` object - :param args: arguments relevant to the backup operation + :param args: arguments passed when the script was called :type args: ``argparse.Namespace`` object - :param extra_rsync_opts: more options to pass to rsync + :param extra_rsync_opts: options to pass to rsync that weren't included + in args (default: ``None``) :type extra_rsync_opts: iterable """ rsync_opts = config.load_list_from_option( @@ -74,4 +78,3 @@ def do_backup(repository, parsed_config, args, extra_rsync_opts=None): syslog.critical(f"Failing command: {e.cmd}") syslog.critical(e.stderr) exit(e.returncode) -