Deploying to gh-pages from @ mailcow/mailcow-dockerized-docs@134ab856d6 🚀
Dieser Commit ist enthalten in:
Ursprung
fd522f737d
Commit
91c6674d39
3 geänderte Dateien mit 30 neuen und 80 gelöschten Zeilen
|
@ -811,34 +811,6 @@
|
|||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#binsh" class="md-nav__link">
|
||||
!/bin/sh
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#backup-mailcow-data" class="md-nav__link">
|
||||
Backup mailcow data
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#httpsmailcowgithubiomailcow-dockerized-docsb_n_r_backup" class="md-nav__link">
|
||||
https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#run-command" class="md-nav__link">
|
||||
run command
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1947,34 +1919,6 @@
|
|||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#binsh" class="md-nav__link">
|
||||
!/bin/sh
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#backup-mailcow-data" class="md-nav__link">
|
||||
Backup mailcow data
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#httpsmailcowgithubiomailcow-dockerized-docsb_n_r_backup" class="md-nav__link">
|
||||
https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#run-command" class="md-nav__link">
|
||||
run command
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1994,6 +1938,8 @@
|
|||
</a>
|
||||
|
||||
|
||||
<h1>Backup</h1>
|
||||
|
||||
<h3 id="backup">Backup<a class="headerlink" href="#backup" title="Permanent link">¶</a></h3>
|
||||
<h4 id="manual">Manual<a class="headerlink" href="#manual" title="Permanent link">¶</a></h4>
|
||||
<p>You can use the provided script <code>helper-scripts/backup_and_restore.sh</code> to backup mailcow automatically.</p>
|
||||
|
@ -2019,32 +1965,36 @@ You should not rename those folders to not break the restore process.</p>
|
|||
</code></pre></div>
|
||||
<h4 id="cronjob">Cronjob<a class="headerlink" href="#cronjob" title="Permanent link">¶</a></h4>
|
||||
<p>You can run the backup script regularly via cronjob. Make sure <code>BACKUP_LOCATION</code> exists:</p>
|
||||
<p>```5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3
|
||||
<div class="highlight"><pre><span></span><code>Per default cron sends the full result of each backup operation by email. If you want cron to only mail on error (non-zero exit code) you may want to use the following snippet. Pathes need to be modified according to your setup (this script is a user contribution).
|
||||
<div class="highlight"><pre><span></span><code>5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3
|
||||
</code></pre></div>
|
||||
<p>Per default cron sends the full result of each backup operation by email. If you want cron to only mail on error (non-zero exit code) you may want to use the following snippet. Pathes need to be modified according to your setup (this script is a user contribution).</p>
|
||||
<p>This following script may be placed in <code>/etc/cron.daily/mailcow-backup</code> - do not forget to mark it as executable via <code>chmod +x</code>:</p>
|
||||
<div class="highlight"><pre><span></span><code>#!/bin/sh
|
||||
|
||||
This following script may be placed in `/etc/cron.daily/mailcow-backup` - do not forget to mark it as executable via `chmod +x`:
|
||||
</code></pre></div></p>
|
||||
<h1 id="binsh">!/bin/sh<a class="headerlink" href="#binsh" title="Permanent link">¶</a></h1>
|
||||
<h1 id="backup-mailcow-data">Backup mailcow data<a class="headerlink" href="#backup-mailcow-data" title="Permanent link">¶</a></h1>
|
||||
<h1 id="httpsmailcowgithubiomailcow-dockerized-docsb_n_r_backup"><a href="https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/">https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/</a><a class="headerlink" href="#httpsmailcowgithubiomailcow-dockerized-docsb_n_r_backup" title="Permanent link">¶</a></h1>
|
||||
<p>set -e</p>
|
||||
<p>OUT="$(mktemp)"
|
||||
export MAILCOW_BACKUP_LOCATION="/opt/backup"
|
||||
SCRIPT="/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh"
|
||||
PARAMETERS="backup all"
|
||||
OPTIONS="--delete-days 30"</p>
|
||||
<h1 id="run-command">run command<a class="headerlink" href="#run-command" title="Permanent link">¶</a></h1>
|
||||
<p>set +e
|
||||
"${SCRIPT}" ${PARAMETERS} ${OPTIONS} 2>&1 > "$OUT"
|
||||
RESULT=$?</p>
|
||||
<p>if [ $RESULT -ne 0 ]
|
||||
# Backup mailcow data
|
||||
# https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/
|
||||
|
||||
set -e
|
||||
|
||||
OUT="$(mktemp)"
|
||||
export MAILCOW_BACKUP_LOCATION="/opt/backup"
|
||||
SCRIPT="/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh"
|
||||
PARAMETERS="backup all"
|
||||
OPTIONS="--delete-days 30"
|
||||
|
||||
# run command
|
||||
set +e
|
||||
"${SCRIPT}" ${PARAMETERS} ${OPTIONS} 2>&1 > "$OUT"
|
||||
RESULT=$?
|
||||
|
||||
if [ $RESULT -ne 0 ]
|
||||
then
|
||||
echo "${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:"
|
||||
echo "RESULT=$RESULT"
|
||||
echo "STDOUT / STDERR:"
|
||||
cat "$OUT"
|
||||
echo "${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:"
|
||||
echo "RESULT=$RESULT"
|
||||
echo "STDOUT / STDERR:"
|
||||
cat "$OUT"
|
||||
fi
|
||||
```</p>
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
|
||||
|
|
Dateidiff unterdrĂĽckt, weil mindestens eine Zeile zu lang ist
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binäre Datei nicht angezeigt.
Laden …
In neuem Issue referenzieren