restic backup --stdin --stdin-filename notes.txt < notes.txt

Category: Backup & Restore

restic backup --stdin --stdin-filename notes.txt < notes.txt

Back up a file streamed from standard input

Reads data from stdin, here the contents of notes.txt, and stores it in a snapshot under the name given by --stdin-filename. Handy for dumping command output or database exports straight into the repository. The original file never needs to exist on disk.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.