User tools

Website tools


backup

Differences

The differences between two versions are shown here.

Link to this comparison view

Both sides of the previous revisionPrevious revision
Next revision
Previous revision
backup [2017/09/21 09:52] – [Überblick] lwsystemsbackup [2018/11/02 17:58] (current) – [Überblick] lwsystems
Zeile 3: Zeile 3:
 ===== Überblick ===== ===== Überblick =====
  
 +  * [[Recovery]]
  
 Benno MailArchiv stores its data under different paths.  Benno MailArchiv stores its data under different paths. 
Zeile 16: Zeile 17:
 The emails are stored in compressed form in the repository. The repository occupies by far the largest space in the archive's file system. No emails are deleted from the repository, so a backup only needs to save the files that have been added since the last backup.  The emails are stored in compressed form in the repository. The repository occupies by far the largest space in the archive's file system. No emails are deleted from the repository, so a backup only needs to save the files that have been added since the last backup. 
  
-A simple incremental network backup using system tools is a good option here. +A simple incremental network backup using system tools is a good option here. 
 + 
 +====== Inkrementelles Backup  ====== 
 + 
 +A simple incremental backup to a locally mounted network share can be implemented with a simple script. 
 + 
 +===== Tar-Archive ===== 
 + 
 +<code bash> 
 +#!/bin/sh 
 +
 +
 +BACKUPDIR=/backup/benno-mailarchiv 
 + 
 +ARCHIVE_DIR=/srv/benno 
 +TS_FILE=$ARCHIVE_DIR/.last_backup 
 + 
 +START_DATE=`date +%Y%m%d%H%M.%S` 
 + 
 +if [ ! -f $TS_FILE ];then 
 +    touch -t 200001010000 $TS_FILE 
 +fi 
 + 
 +/usr/bin/find $ARCHIVE_DIR -depth -newer $TS_FILE -print |\ 
 +    tar -T - -cf ${BACKUPDIR}/benno-backup_$(date +%Y-%m-%d_%H-%M-%S).tar  
 +touch -t $START_DATE $TS_FILE 
 +</code> 
 + 
 +===== Verzeichnisstruktur ===== 
 + 
 +<code bash> 
 +#!/bin/sh 
 +
 +
 +BACKUPDIR=/mnt/backup/$hostname 
 + 
 +ARCHIVE_DIR=/srv/benno 
 +TS_FILE=$ARCHIVE_DIR/.last_backup 
 + 
 +START_DATE=`date +%Y%m%d%H%M.%S` 
 + 
 +if [ ! -f $TS_FILE ];then 
 +    touch -t 200001010000 $TS_FILE 
 +fi 
 + 
 +/usr/bin/find $ARCHIVE_DIR -depth -newer $TS_FILE -print |\ 
 +    /bin/cpio --pass-through --preserve-modification-time --make-directories \ 
 +    $BACKUPDIR 
 +touch -t $START_DATE $TS_FILE 
 +</code> 
  
 ====== Inkrementelles Netzwerk-Backup  ====== ====== Inkrementelles Netzwerk-Backup  ======
backup.1505987559.txt.gz · Zuletzt geändert: 2017/09/21 09:52 von lwsystems