diff options
author | Ryan Polley <rypolley@gmail.com> | 2021-01-26 17:15:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 00:15:14 +0100 |
commit | 83116e58f209df0a9ee1f58b96b9e453b07f2cc7 (patch) | |
tree | 0cfd0d1df064ea85c23410292fd47ec5c4ad6455 /docs/usage | |
parent | b20c7229e6973790d6ac61983f48a1af6c421b8f (diff) |
add examples for --paths-from-stdin, --paths-from-command, --paths-separator (#5644)
docs: add examples for --paths-from-stdin, --paths-from-command, --paths-separator
Diffstat (limited to 'docs/usage')
-rw-r--r-- | docs/usage/create.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/usage/create.rst b/docs/usage/create.rst index 4b3966a47..06d2748e1 100644 --- a/docs/usage/create.rst +++ b/docs/usage/create.rst @@ -74,3 +74,14 @@ Examples $ cd /home/user/Documents # The root directory of the archive will be "projectA" $ borg create /path/to/repo::daily-projectA-{now:%Y-%m-%d} projectA + + # Use external command to determine files to archive + # Use --paths-from-stdin with find to only backup files less than 1MB in size + $ find ~ -size -1000k | borg create --paths-from-stdin /path/to/repo::small-files-only + # Use --paths-from-command with find to only backup files from a given user + $ borg create --paths-from-command /path/to/repo::joes-files -- find /srv/samba/shared -user joe + # Use --paths-from-stdin with --paths-delimiter (for example, for filenames with newlines in them) + $ find ~ -size -1000k -print0 | borg create \ + --paths-from-stdin \ + --paths-delimiter "\0" \ + /path/to/repo::smallfiles-handle-newline |