Usefull when you want to quickly see what locations are being backuped where.</p><p><strong>Pro tip:</strong> if it gets a bit long you can read it more easily with <code>autorestic info | less</code> 😉</p><preclass=""><codeclass="bash code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><divclass="line-0-0-5 "data-content="autorestic info"><spanclass="lineCounter-0-0-4 prim">1</span>autorestic info</div><br></code></pre><h2id="with-a-custom-file"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>With a custom file</h2><preclass=""><codeclass="bash code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><divclass="line-0-0-5 "data-content="autorestic -c path/to/some/config.yml info"><spanclass="lineCounter-0-0-4 prim">1</span>autorestic -c path/to/some/config.yml info</div><br></code></pre><scriptid="GyQprlRakI">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("GyQprlRakI","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#info"class="h1"data-content-highlight="info">info</a><ahref="#with-a-custom-file"class="h2"data-content-highlight="with-a-custom-file">With a custom file</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
Usefull when you want to quickly see what locations are being backuped where.</p><p><strong>Pro tip:</strong> if it gets a bit long you can read it more easily with <code>autorestic info | less</code> 😉</p><preclass=""><codeclass="bash code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><divclass="line-0-0-5 "data-content="autorestic info"><spanclass="lineCounter-0-0-4 prim">1</span>autorestic info</div><br></code></pre><h2id="with-a-custom-file"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>With a custom file</h2><preclass=""><codeclass="bash code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><divclass="line-0-0-5 "data-content="autorestic -c path/to/some/config.yml info"><spanclass="lineCounter-0-0-4 prim">1</span>autorestic -c path/to/some/config.yml info</div><br></code></pre><scriptid="uOxhKZCqkH">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("uOxhKZCqkH","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#info"class="h1"data-content-highlight="info">info</a><ahref="#with-a-custom-file"class="h2"data-content-highlight="with-a-custom-file">With a custom file</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
</style><linkhref="/autorestic/./dist/codedoc-styles.css"rel="stylesheet"><scriptasync=""defer=""src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><divclass="header-0-0-9"><scriptasync=""defer=""src="https://buttons.github.io/buttons.js"></script><aclass="github-button"data-color-scheme="no-preference: light; light: light; dark: dark;"data-icon="false"data-show-count="true"data-size="false"href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><aclass="watermark-0-0-8"href="https://github.com/CONNECT-platform/codedoc"target="_blank">Created With<svgviewBox="0 0 536 296"version="1.1"xmlns="http://www.w3.org/2000/svg"><gid="codedoc"transform="translate(-244.000000, -364.000000)"fill-rule="nonzero"><pathd="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><divid="-codedoc-container"class="container"><h1id="autorestic"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>autorestic</h1><p>High backup level CLI utility for <ahref="https://restic.net/">restic</a>.</p><p>Autorestic is a wrapper around the amazing <ahref="https://restic.net/">restic</a>. While being amazing the restic cli can be a bit overwhelming and difficoult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂</p><marker><!-- ![Sketch](./docs/Sketch.png) -->
</marker><h2id="✈️-roadmap"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>✈️ Roadmap</h2><p>I would like to make the official <code>1.0</code> release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)</p><h2id="🌈-features"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>🌈 Features</h2><ul><li>YAML config files, no CLI</li><li>Predictable</li><li>Incremental -> Minimal space is used</li><li>Backup locations to multiple backends</li><li>Snapshot policies and pruning</li><li>Simple interface</li><li>Fully encrypted</li><li>Pre/After hooks</li><li>Exclude pattern/files</li><li>Backup & Restore docker volumes</li><li><del>Seamless cron jobs for automatic backup</del><ahref="https://github.com/cupcakearmy/autorestic/issues/21">in development</a>.</li></ul><scriptid="orjaQRqhhr">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("orjaQRqhhr","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#autorestic"class="h1"data-content-highlight="autorestic">autorestic</a><ahref="#✈️-roadmap"class="h2"data-content-highlight="✈️-roadmap">✈️ Roadmap</a><ahref="#🌈-features"class="h2"data-content-highlight="🌈-features">🌈 Features</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
</marker><h2id="✈️-roadmap"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>✈️ Roadmap</h2><p><del>I would like to make the official <code>1.0</code> release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)</del></p><p>As of version <code>0.18</code> crons are supported wich where the last feature missing for a <code>1.0</code>. Will test this for a few weeks and then it's time for the first "real" release! 🎉 Also we now have waaay better docs 📒</p><h2id="🌈-features"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>🌈 Features</h2><ul><li>YAML config files, no CLI</li><li>Incremental -> Minimal space is used</li><li>Backup locations to multiple backends</li><li>Snapshot policies and pruning</li><li>Fully encrypted</li><li>Pre/After hooks</li><li>Exclude pattern/files</li><li>Cron jobs for automatic backup</li><li>Backup & Restore docker volumes</li></ul><scriptid="pHuy_EBRXn">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("pHuy_EBRXn","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#autorestic"class="h1"data-content-highlight="autorestic">autorestic</a><ahref="#✈️-roadmap"class="h2"data-content-highlight="✈️-roadmap">✈️ Roadmap</a><ahref="#🌈-features"class="h2"data-content-highlight="🌈-features">🌈 Features</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.</p><preclass="with-bar"><codeclass="yaml code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span>.autorestic.yml</span></span><divclass="line-0-0-5 "data-content="locations:"><spanclass="lineCounter-0-0-4 prim">1</span><spanclass="token key atrule">locations</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" my-location-name:"><spanclass="lineCounter-0-0-4">2</span><spanclass="token key atrule">my-location-name</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" from: path/to/backup"><spanclass="lineCounter-0-0-4">3</span><spanclass="token key atrule">from</span><spanclass="token punctuation">:</span> path/to/backup</div><br><divclass="line-0-0-5 "data-content=" to:"><spanclass="lineCounter-0-0-4">4</span><spanclass="token key atrule">to</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" - name-of-backend"><spanclass="lineCounter-0-0-4 prim">5</span><spanclass="token punctuation">-</span> name<spanclass="token punctuation">-</span>of<spanclass="token punctuation">-</span>backend</div><br><divclass="line-0-0-5 "data-content=" - also-backup-to-this-backend"><spanclass="lineCounter-0-0-4 prim">6</span><spanclass="token punctuation">-</span> also<spanclass="token punctuation">-</span>backup<spanclass="token punctuation">-</span>to<spanclass="token punctuation">-</span>this<spanclass="token punctuation">-</span>backend</div><br></code></pre><h2id="from"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span><code>from</code></h2><p>This is the source of the location.</p><h4id="how-are-paths-resolved"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>How are paths resolved?</h4><p>Paths can be absolute or relative. If relative they are resolved relative to the location of the config file. Tilde <code>~</code> paths are also supported for home folder resolution.</p><h2id="to"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span><code>to</code></h2><p>This is einther a single backend or an array of backends. The backends have to be configured in the same config file.</p><scriptid="bCPgbOHOjf">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("bCPgbOHOjf","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#🗂-locations"class="h1"data-content-highlight="🗂-locations">🗂 Locations</a><ahref="#from"class="h2"data-content-highlight="from">from</a><ahref="#how-are-paths-resolved"class="h4"data-content-highlight="how-are-paths-resolved">How are paths resolved?</a><ahref="#to"class="h2"data-content-highlight="to">to</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.</p><preclass="with-bar"><codeclass="yaml code-0-0-3"tabindex="0"><spanclass="wmbar-0-0-6"><span></span><span></span><span></span><span>.autorestic.yml</span></span><divclass="line-0-0-5 "data-content="locations:"><spanclass="lineCounter-0-0-4 prim">1</span><spanclass="token key atrule">locations</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" my-location-name:"><spanclass="lineCounter-0-0-4">2</span><spanclass="token key atrule">my-location-name</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" from: path/to/backup"><spanclass="lineCounter-0-0-4">3</span><spanclass="token key atrule">from</span><spanclass="token punctuation">:</span> path/to/backup</div><br><divclass="line-0-0-5 "data-content=" to:"><spanclass="lineCounter-0-0-4">4</span><spanclass="token key atrule">to</span><spanclass="token punctuation">:</span></div><br><divclass="line-0-0-5 "data-content=" - name-of-backend"><spanclass="lineCounter-0-0-4 prim">5</span><spanclass="token punctuation">-</span> name<spanclass="token punctuation">-</span>of<spanclass="token punctuation">-</span>backend</div><br><divclass="line-0-0-5 "data-content=" - also-backup-to-this-backend"><spanclass="lineCounter-0-0-4 prim">6</span><spanclass="token punctuation">-</span> also<spanclass="token punctuation">-</span>backup<spanclass="token punctuation">-</span>to<spanclass="token punctuation">-</span>this<spanclass="token punctuation">-</span>backend</div><br></code></pre><h2id="from"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span><code>from</code></h2><p>This is the source of the location.</p><h4id="how-are-paths-resolved"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span>How are paths resolved?</h4><p>Paths can be absolute or relative. If relative they are resolved relative to the location of the config file. Tilde <code>~</code> paths are also supported for home folder resolution.</p><h2id="to"class="heading-0-0-1"><spanclass="anchor-0-0-2"data-ignore-text=""><spanclass="icon-font"data-ignore-text=""style="vertical-align: sub">link</span></span><code>to</code></h2><p>This is einther a single backend or an array of backends. The backends have to be configured in the same config file.</p><scriptid="ZqqRoJTlDZ">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("ZqqRoJTlDZ","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#🗂-locations"class="h1"data-content-highlight="🗂-locations">🗂 Locations</a><ahref="#from"class="h2"data-content-highlight="from">from</a><ahref="#how-are-paths-resolved"class="h4"data-content-highlight="how-are-paths-resolved">How are paths resolved?</a><ahref="#to"class="h2"data-content-highlight="to">to</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
@ -8,20 +8,20 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While
## ✈️ Roadmap
I would like to make the official `1.0` release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)
~~I would like to make the official `1.0` release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)~~
As of version `0.18` crons are supported wich where the last feature missing for a `1.0`. Will test this for a few weeks and then it's time for the first "real" release! 🎉 Also we now have waaay better docs 📒
## 🌈 Features
- YAML config files, no CLI
- Predictable
- Incremental -> Minimal space is used
- Backup locations to multiple backends
- Snapshot policies and pruning
- Simple interface
- Fully encrypted
- Pre/After hooks
- Exclude pattern/files
- Cron jobs for automatic backup
- Backup & Restore docker volumes
- ~~Seamless cron jobs for automatic backup~~ [in development](https://github.com/cupcakearmy/autorestic/issues/21).
Often it is usefull to trigger backups autmatically. For this we can specify a `cron` attribute to each location.
> Available since version 0.18
```yaml | .autorestic.yml
locations:
my-location:
@ -12,4 +14,26 @@ locations:
Here is a awesome website with [some examples](https://crontab.guru/examples.html) and an [explorer](https://crontab.guru/)
## Installing the cron
To actually enable cron jobs you need something to call `autorestic cron` on a timed shedule. Note that the shedule has nothing to do with the `cron` attribute in each location. My advise would be to trigger the command every 5min, but if you have a cronjob that runs only once a week, it's probably enough to shedule it once a day.
### Crontab
Here is an example using crontab, but systemd would do too.
First, open your crontab in edit mode
```bash
crontab -e
```
Then paste this at the bottom of the file and save it. Note that in this specific example the `.autorestic.yml` is located in `/srv/`. You need to modify that part of course to fit your config file.
Unforunately during this process formatting and comments are lost. That is why autorestic will place a copy of your old config next to the one we are writing to.</p><scriptid="EDDjPqkVjh">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("EDDjPqkVjh","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#❓-qa"class="h1"data-content-highlight="❓-qa">❓ QA</a><ahref="#my-config-file-was-moved"class="h2"data-content-highlight="my-config-file-was-moved">My config file was moved?</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>
Unforunately during this process formatting and comments are lost. That is why autorestic will place a copy of your old config next to the one we are writing to.</p><scriptid="KuqlFgUACJ">(function(){functionload(){if(window.__sdh_transport){window.__sdh_transport("KuqlFgUACJ","qcaKEY878Mn2dFQW/lSrDg==",{});}};if(document.readyState=='complete')load();elsewindow.addEventListener('load',load);})()</script><divclass="contentnav-0-0-14"data-no-search=""><ahref="#❓-qa"class="h1"data-content-highlight="❓-qa">❓ QA</a><ahref="#my-config-file-was-moved"class="h2"data-content-highlight="my-config-file-was-moved">My config file was moved?</a></div></div><divid="-codedoc-toc"class="toc-0-0-11"><divclass="content-0-0-12"><p><ahref="/autorestic/">Home</a>