You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
12 KiB
56 lines
12 KiB
5 years ago
|
<!DOCTYPE html><html><head><title>Autorestic | Hooks</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||
|
body, input, button {
|
||
|
font-family: 'Hind', sans-serif;
|
||
|
}
|
||
|
|
||
|
code, .hljs {
|
||
|
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||
|
}
|
||
|
|
||
|
.icon-font {
|
||
|
font-family: 'Material Icons';
|
||
|
font-weight: normal;
|
||
|
font-style: normal;
|
||
|
font-size: 24px; /* Preferred icon size */
|
||
|
display: inline-block;
|
||
|
line-height: 1;
|
||
|
text-transform: none;
|
||
|
letter-spacing: normal;
|
||
|
word-wrap: normal;
|
||
|
white-space: nowrap;
|
||
|
direction: ltr;
|
||
|
|
||
|
/* Support for all WebKit browsers. */
|
||
|
-webkit-font-smoothing: antialiased;
|
||
|
/* Support for Safari and Chrome. */
|
||
|
text-rendering: optimizeLegibility;
|
||
|
|
||
|
/* Support for Firefox. */
|
||
|
-moz-osx-font-smoothing: grayscale;
|
||
|
|
||
|
/* Support for IE. */
|
||
|
font-feature-settings: 'liga';
|
||
|
}
|
||
|
|
||
|
.icon-font.outline {
|
||
|
font-family: 'Material Icons Outlined';
|
||
|
}
|
||
5 years ago
|
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="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><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="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><div id="-codedoc-container" class="container"><h1 id="hooks" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Hooks</h1><p>Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.</p><pre class="with-bar"><code class="yml code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span>.autorestic.yml</span></span><div class="line-0-0-5 " data-content=
|
||
5 years ago
|
<a href="/autorestic/quick">Quick Start</a>
|
||
|
<a href="/autorestic/installation">Installation</a>
|
||
5 years ago
|
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="clquYnhzFI">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("clquYnhzFI", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||
|
<a href="/autorestic/location/hooks">Hooks</a>
|
||
|
<a href="/autorestic/location/exclude">Exluding Files</a>
|
||
|
<a href="/autorestic/location/forget">Forget Policy</a>
|
||
|
<a href="/autorestic/location/cron">Cron</a>
|
||
|
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="ZZUHFdtfcJ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ZZUHFdtfcJ", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||
|
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="RcTiSNeNwX">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("RcTiSNeNwX", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||
5 years ago
|
<a href="/autorestic/cli/check">Check</a>
|
||
|
<a href="/autorestic/cli/backup">Backup</a>
|
||
|
<a href="/autorestic/cli/restore">Restore</a>
|
||
|
<a href="/autorestic/cli/forget">Forget</a>
|
||
|
<a href="/autorestic/cli/cron">Cron</a>
|
||
|
<a href="/autorestic/cli/exec">Exec</a>
|
||
|
<a href="/autorestic/cli/install">Install</a>
|
||
|
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||
5 years ago
|
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="LOToanHr_S">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("LOToanHr_S", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="OPmUBlnWWF">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("OPmUBlnWWF", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="zixeL_cXOK">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("zixeL_cXOK", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="hVjQJTxwoT">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("hVjQJTxwoT", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|