cron jobs using rsync to synchronize across systems

#!/bin/sh # RSYNC main files cp /root/cron-sync-info.txt /root/cron-sync_`date +'%d%b%y-%H'`.txt # clear file date +'%d%b%y-%H' > /root/cron-sync-info.txt rsync -rp /1TB/ /z_1TB_BAK/ # rsync -rp /1TB/ /z_1TB_BAK/ # optional tests to confirm syncronization # ls -alR /1TB | wc -l ; ls -alR /z_1TB_BAK/ | wc -l # ls -alR / | wc -l ; ls -alR /z_ROOT_BAK/ | wc -l # Rsync root directories # # would be ideal if other drives unmounted rsync -rp / /z_ROOT_BAK/ # exclude: # 1TB/ # z_1TB_BAK/ # z_ROOT_BAK/ # 250G/ # lost+found/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /boot /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /home /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # #### rsync -rp /media /z_ROOT_BAK/ # added line to prevent mounted devices from filling up back up 14 may 2010 - john # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /proc /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /srv /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /usr /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /dev /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /lib /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /mnt /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /root /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /sys /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /var /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /bin /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /etc /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /opt /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /sbin /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt # # rsync -rp /tmp /z_ROOT_BAK/ # echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt ls /z_ROOT_BAK/ >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt w >> /root/cron-sync-info.txt df -h | grep -v udev >> /root/cron-sync-info.txt date >> /root/cron-sync-info.txt echo " " >> /root/cron-sync-info.txt echo "--------------" >> /root/cron-sync-info.txt #

ebook:
Full Size
Jeep Buyer's
Guide
ebook:
Practical Suggestions
for Microsoft
Windows
Linux Tackles Microsoft
12 hour Video Course by john:
The Art of Linux System Administration
published by O'Reilly Media
Study Guide for the LPIC-2 Certification Exams
search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech-
Bible overview


An overview of Biblical history:
"Promises and Prophets"

Wagoneers

FULL SIZE JEEPS

JeepMeister
"Jeep is America's
only real sports car."
-Enzo Ferrari


MeisterTech
Diesels +

One Page Overview of Linux Commands

click for an image of the 5 essential Linux commands

An Intro to Linux
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983
purchase AMSOIL
at Midway Auto on SR9 in Snohomish,
or at Northland Diesel in Bellingham, WA


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)