Skip to content

Print borg create --list --dry-run to STDOUT to allow combination with --paths-from-stdin #8710

Open
@mlell

Description

@mlell

Currently, borg seems to list files to STDERR, which prevents its use in UNIX pipes. Of course, I could redirect 2>&1 but it would also include error messages and password prompts. The primary purpose of borg create --list --dry-run ... is to list files, so one could argue that therefore this should go to STDOUT and not STDERR. Also, this allows to use the borg pattern matching, then processing these somehow and finally pipe them back to borg create ... --paths-from-stdin.

My use-case is the following: I am using the pcloud remote of rclone to back up my data. This is slow when many small files are involved. As a test I arbitrarily tried to upload the git repo of opendataeditor and saw from vnstat -l that upload speed is only a few kbit/s. As it was noted that multiple parallel borg2 processes can concurrently write to the same repo, I did exactly that.

However, these processes tended to "clump together" uploading the same files at the same time, which is why I wanted to shuffle the file order so that the different upload processes do not interfere as much. This is where borg create --list --dry-run ... | shuf would become handy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions