Linux/Restic: Difference between revisions
< Linux
(Die Seite wurde neu angelegt: „ Category:Linux/Services Category:Linux“) |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Create repository == | |||
<blockquote><pre> | |||
restic --repo /srv/restic-repo init # local | |||
restic --repo sftp:user@host:/srv/restic-repo init # sftp | |||
restic --repo b2:bucketname:path/to/repo init # backblaze b2 | |||
</pre></blockquote> | |||
== Backblaze == | |||
<blockquote><pre> | |||
export B2_ACCOUNT_ID=<MY_APPLICATION_KEY_ID> | |||
export B2_ACCOUNT_KEY=<MY_APPLICATION_KEY> | |||
</pre></blockquote> | |||
== Backup == | |||
<blockquote><pre> | |||
restic --repo /srv/restic-repo --verbose backup ~/work | |||
restic --repo /srv/restic-repo backup ~/work --exclude="*.c" --exclude-file=excludes.txt | |||
restic -r /srv/restic-repo backup --files-from /tmp/files_to_backup | |||
</pre></blockquote> | |||
== Restoring == | |||
<blockquote><pre> | |||
restic --repo {repo} restore 3e619b45 --target /srv/restore | |||
restic --repo {repo} restore 3e619b45 --target /srv/restore --include /srv/docker-data/wireguard | |||
</pre></blockquote> | |||
== speed up == | |||
* restic + backblaze: --fast-list | |||
[[Category:Linux/Services]] | [[Category:Linux/Services]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 11:59, 29 November 2023
Create repository
restic --repo /srv/restic-repo init # local restic --repo sftp:user@host:/srv/restic-repo init # sftp restic --repo b2:bucketname:path/to/repo init # backblaze b2
Backblaze
export B2_ACCOUNT_ID=<MY_APPLICATION_KEY_ID> export B2_ACCOUNT_KEY=<MY_APPLICATION_KEY>
Backup
restic --repo /srv/restic-repo --verbose backup ~/work restic --repo /srv/restic-repo backup ~/work --exclude="*.c" --exclude-file=excludes.txt restic -r /srv/restic-repo backup --files-from /tmp/files_to_backup
Restoring
restic --repo {repo} restore 3e619b45 --target /srv/restore restic --repo {repo} restore 3e619b45 --target /srv/restore --include /srv/docker-data/wireguard
speed up
- restic + backblaze: --fast-list