blob: 746da39574e618f3e0a8a44d82c1711744de17b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/bin/bash
#
# This script will rsync the entire filesystem to /mnt/backup/live/
# This script assumes /mnt/backup/live/ is where we want to backup files
#
# My personal setup:
# -- has this running hourly with cron
# -- mounts /mnt/backup to it's own specific NFS share configured for the host
#
# !! WARNING SLOW FIRST RUN !!
# the first run will be slow so run this first before setting up the hourly job
rsync -aAX --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/usr/tmp/*","/run/*","/mnt/*","/media/*","/var/cache/*","/","/lost+found"} /* /mnt/backup/live/ --delete
|