On 19/12/19 4:02 am, rhkra...@gmail.com wrote:
Aside / Admission: I don't backup all that I should and as often as I should,
so I'm looking for ways to improve. One thought I have is to write my own
backup "system" and use it, and I've thought about that a little,
I understand. For a while I used mc to copy/update files to USB. I had
to watch to copy - time consuming. Unreliable, because it was manual.
I also realised that I need to be able to go back, and not just to last
week or last month. The file I change often, I use only a few days a year.
I get that if you create a file and never touch it again, the rotating
back-ups are useful. I use timeshift for system partition back-up's
(and it has saved me several times).
Anyway, I use rsync with back-up option to a backup/year/month/date/hour
using $NAMEs. The scripts are on the destination to ensure that the
destinatoin is available.
Each USB is listed at /etc/fstab to prevent automount on insertion.
mount options include noauto,noexec root's cron mounts the
destination, remounts it exec then runs the script, which ends with an
unmount command
2 * * * * mount /mnt/g502 && mount -o remount,exec /mnt/g502/ && cd
/mnt/g502 && ./daily.sh
extract from daily.sh:
DAY=`date +%Y%b%d`
NOW=`date +%Y%b%d%H`
HOUR=`date +%H`
YEAR=`date +%Y`
cd /mnt/g502
cp /home/keith/rsyncExclusionList.txt ./
date >> ./copydailyStarted
echo "g502" >> ./copydailyStarted
#$DAY >>
#date >> /mnt/g502/copydailyStarted
#$NOW >> /mnt//g502/copydailyStarted
mkdir ./rsynccBackupp/$DAY/$HOUR
rsync -rubvLH --backup-dir=./rsynccBackupp/$DAY/$HOUR --exclude
'**ache' --exclude '.thunderb**' --exclude '**mozilla**' --exclude
'**mzzlla**' --exclude '**eamonkey**' --exclude '**hromium** '
/mnt/data/keith/ ./
The --exclude bits aren't working, yet; and neither did an
--exclude-from-list bit.
Anyhow, just my 2 bobs worth.
--
Keith Bainbridge
kkeith.bainbridge.3...@gmail.com
+61 (0)447 667 468