mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 05:24:56 +00:00
Updating with the changes on the external HD
This commit is contained in:
parent
87930d7d9d
commit
e588f9685b
@ -1,11 +1,8 @@
|
|||||||
YEARMONTH=`date +%Y/%m-%b`
|
YEARMONTH=`date +%Y/%m-%b`
|
||||||
YEAR=`date +%Y`
|
YEAR=`date +%Y`
|
||||||
HDPath="/run/media/bruno/Seagate\ Expansion\ Drive"
|
HDPath="/run/media/bruno/Seagate"
|
||||||
HDYEARMONTH="$HDPath/$YEARMONTH"
|
HDYEARMONTH="$HDPath/$YEARMONTH"
|
||||||
|
|
||||||
White="\e[97m"
|
|
||||||
Gray="\e[39m"
|
|
||||||
|
|
||||||
mkdir -p "$HDPath/$YEAR"
|
mkdir -p "$HDPath/$YEAR"
|
||||||
mkdir -p "$HDYEARMONTH"
|
mkdir -p "$HDYEARMONTH"
|
||||||
mkdir -p "$HDYEARMONTH/LinuxHome"
|
mkdir -p "$HDYEARMONTH/LinuxHome"
|
||||||
@ -23,37 +20,36 @@ echo
|
|||||||
echo Press enter key to start the backup
|
echo Press enter key to start the backup
|
||||||
read
|
read
|
||||||
echo
|
echo
|
||||||
echo -e "$White`date +%r` - Copying Dropbox folder (1/7)...$Gray"
|
|
||||||
|
echo -e "\e[97m`date +%r` - Copying Dropbox folder (1/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/Dropbox" "$HDYEARMONTH/Multimedia/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/Dropbox" "$HDYEARMONTH/Multimedia/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying Linux Home folder (2/7)...$Gray"
|
echo -e "\e[97m`date +%r` - Copying Linux Home folder (2/7)...\e[39m"
|
||||||
|
|
||||||
echo -e "$White `date +%r` - Bruno$Gray"
|
echo -e "\e[97m `date +%r` - Bruno\e[39m"
|
||||||
eval $backup "/home/bruno/" "$HDYEARMONTH/LinuxHome/bruno/" || echo ""
|
eval $backup "/home/bruno/" "$HDYEARMONTH/LinuxHome/bruno/" || echo ""
|
||||||
|
|
||||||
echo -e "$White `date +%r` - Admin$Gray"
|
echo -e "\e[97m `date +%r` - Admin\e[39m"
|
||||||
eval $backup "/home/admin/" "$HDYEARMONTH/LinuxHome/admin/" || echo ""
|
eval $backup "/home/admin/" "$HDYEARMONTH/LinuxHome/admin/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying Localização folder (3/7)...$Gray"
|
echo -e "\e[97m `date +%r` - Lost+Found\e[39m"
|
||||||
|
eval $backup "/home/lost+found/" "$HDYEARMONTH/LinuxHome/lost+found/" || echo ""
|
||||||
|
|
||||||
|
echo -e "\e[97m`date +%r` - Copying Localização folder (3/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/Localização" "$HDYEARMONTH/Multimedia/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/Localização" "$HDYEARMONTH/Multimedia/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying My Documents folder (4/7)...$Gray"
|
echo -e "\e[97m`date +%r` - Copying My Documents folder (4/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/My\ Documents" "$HDYEARMONTH/Multimedia/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/MyDocuments" "$HDYEARMONTH/Multimedia/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying Música folder (5/7)...$Gray"
|
echo -e "\e[97m`date +%r` - Copying Música folder (5/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/Música" "$HDYEARMONTH/Multimedia/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/Música" "$HDYEARMONTH/Multimedia/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying Fotos folder (6/7)...$Gray"
|
echo -e "\e[97m`date +%r` - Copying Fotos folder (6/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/Fotos" "$HDPath/$YEAR/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/Fotos" "$HDPath/$YEAR/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Copying Virtual Machines folder (7/7)...$Gray"
|
echo -e "\e[97m`date +%r` - Copying Virtual Machines folder (7/7)...\e[39m"
|
||||||
eval $backup "/run/media/bruno/Multimedia/Virtual\ Machines" "$HDPath/$YEAR/" || echo ""
|
eval $backup "/run/media/bruno/Multimedia/Virtual\ Machines" "$HDPath/$YEAR/" || echo ""
|
||||||
|
|
||||||
echo -e "$White`date +%r` - Backup finished. Please, verify your log files.$Gray"
|
echo -e "\e[97m`date +%r` - Backup finished. Please, verify your log files.\e[39m"
|
||||||
|
|
||||||
kdialog --title "Backup Complete" --msgbox "Backup finished successfully"
|
kdialog --title "Backup Complete" --msgbox "Backup finished successfully"
|
||||||
|
|
||||||
echo
|
|
||||||
echo Press enter key to close
|
|
||||||
read
|
|
||||||
|
|
||||||
|
@ -1 +1,5 @@
|
|||||||
.cache/*
|
.cache/*
|
||||||
|
Downloads/*
|
||||||
|
TransMit\ Tools\ -\ Studio\ 2015/*
|
||||||
|
Apps/*
|
||||||
|
shared/*
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
terminator -m -T BACKUP -x systemd-inhibit sudo bash .Backup_HD_1TB.sh
|
terminator -m -T BACKUP -x time systemd-inhibit sudo bash .Backup_HD_1TB.sh; echo; echo "Press enter key to close"; read
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user