User Tools

Site Tools


backups:rdiff_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
backups:rdiff_backup [2016/11/10 14:29] – created peterbackups:rdiff_backup [2019/11/26 20:30] (current) – removed peter
Line 1: Line 1:
-====== Backups - rdiff backup ====== 
- 
-<code bash> 
-#!/bin/bash 
-EXCLUDES="/tmp /var/tmp /proc /sys /selinux /media /dev/shm /mnt" 
-OPTIONS="--exclude-device-files --print-statistics --force --ssh-no-compression" 
-MAXAGE="1M" 
- 
-SRC="/" 
-DST="server2.firma.pl::/backup-zdalny/server1" 
- 
-for i in $EXCLUDES; do 
-  OPTIONS="$OPTIONS --exclude $i" 
-done 
- 
-rdiff-backup $OPTIONS $SRC $DST 
-STATUS=$? 
- 
-msg="" 
-if [ $STATUS -eq 0 ]; then 
-  msg="$msg Backup OK" 
-  rdiff-backup --force --remove-older-than $MAXAGE $DST 
-  if [ $? -eq 0 ]; then 
-    msg="$msg Cleaning OK" 
-  else 
-    msg="$msg Failed to remove older than $MAXAGE" 
-  fi 
-else 
-  msg="$msg Failed to copy" 
-fi 
- 
-echo $msg 
-exit $STATUS 
-</code> 
  
backups/rdiff_backup.1478788174.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki