#!/bin/bash
# Filename: Backup
# Version: 211010
# Author: robz
# Works with "Back In Time" to backup, log actions and notify when complete.
# Configure "Back In Time" via the GUI and run from a user crontab.
# 00 */6 * * * export DISPLAY=:0 && /home//.scripts/Backup > /dev/null
# 2>&1
NOW=`date +%A-%H:%M` # Datestamp.
SOUND=$HOME/Audio/2tone.wav
ICON=/usr/share/icons/Humanity/actions/48/document-save.svg
LOGFILE="$HOME/Backup-for-$NOW.log" # Log name and path.
OLDLOG="$HOME/Backup-for-*.log"
rm -f $OLDLOG # Delete old logfile.
sync && nice -n 19 \
/usr/bin/backintime --backup-job 2>&1 > $LOGFILE && \ # Do backup n'log.
notify-send -i $ICON "Backup job has completed" & \ # Hey it's done.
/usr/bin/canberra-gtk-play --volume 6 -f $SOUND # I said, IT'S DONE!
# Filename: Backup
# Version: 211010
# Author: robz
# Works with "Back In Time" to backup, log actions and notify when complete.
# Configure "Back In Time" via the GUI and run from a user crontab.
# 00 */6 * * * export DISPLAY=:0 && /home/
# 2>&1
NOW=`date +%A-%H:%M` # Datestamp.
SOUND=$HOME/Audio/2tone.wav
ICON=/usr/share/icons/Humanity/actions/48/document-save.svg
LOGFILE="$HOME/Backup-for-$NOW.log" # Log name and path.
OLDLOG="$HOME/Backup-for-*.log"
rm -f $OLDLOG # Delete old logfile.
sync && nice -n 19 \
/usr/bin/backintime --backup-job 2>&1 > $LOGFILE && \ # Do backup n'log.
notify-send -i $ICON "Backup job has completed" & \ # Hey it's done.
/usr/bin/canberra-gtk-play --volume 6 -f $SOUND # I said, IT'S DONE!
Powered by ScribeFire.
No comments:
Post a Comment