User Tools

Site Tools


daily_and_weekly_backup_with_rsync

Differences

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

Link to this comparison view

Next revision
Previous revision
daily_and_weekly_backup_with_rsync [2009/06/04 15:09]
k2patel created
— (current)
Line 1: Line 1:
-==== Daily and Weekly Backup with Rsync ==== 
-<code bash | backup-cron.sh>​ 
-#!/bin/bash 
-#exclude file will contain strings or directories that should not be archived: 
-#euroco/* 
-#lithium/* 
-#​jason/​stealthii/​* 
-#logs 
  
-DAY=$(/​bin/​date +%m%d%y) 
-DOW=$(/​bin/​date +%u) 
- 
-if [ $DOW == '​7'​ ]; then 
- 
-        /​usr/​bin/​rsync -a --delete --inplace --exclude-from '/​root/​exclude'​ /home /​media/​backup/​stealthsrv/​weekly-$DAY 
-else 
-        /​usr/​bin/​rsync -a --delete --inplace --exclude-from '/​root/​exclude'​ /home /​media/​backup/​stealthsrv/​daily 
-fi 
- 
-</​code>​ 
daily_and_weekly_backup_with_rsync.1244128198.txt.gz ยท Last modified: 2020/08/10 02:29 (external edit)