backup_paths

View source

This function takes a newline-separated list of absolute paths and creates canonical or ephemeral backups as needed.

Paths are assembled by taking the value of $BACKUP_ROOT and concatenating to it /canonical or /ephemeral followed by the absolute path. For ephemeral backups, a timestamp is also appended to the end of the filename.

Checks are performed for permission to read the files being copied. If permission is not granted to the user running tori, the command set in $AUTHORIZE_COMMAND will be used to escalate privilege.