back up script
#!/bin/bash
- this is a script to back up the files for my business
- I put it in my autostart.sh so it comes up when I log into fluxbox
- but one could just as well put it in crontab to pop up once a week, or something.
A=$(zenity —entry —title "Back it UP!" —text "It is recommended that you back up your financial data at least once a week. Would you like to back up your files now? Type 'yes' to continue")
if [ $A != yes ]; then
zenity —warning —title Okay —text "Don't forget to do a back up soon!"
end
else
zenity —info —title "Proceed" —text "Back Up will begin now."
- I originally wrote this to run on kubuntu, but for Linguas OS, you would use gksu instead of sudo
- also, one could use rsync instead of cp -u (to my knowledge, they do about the same thing, copy directories and files from one location to another, but only changing what is new in them).
sudo cp -r -u /path/to/files /path/to/back-up/dir/ | tee >(zenity —title "Copying files to back-up!" —progress —pulsate —auto-close)
sudo cp -r -u /home/username/OmegaT/TMs /path/to/backup/dir | tee >(zenity —title "Copying translation memories to back-up!" —progress —auto-close)
zenity —info —title "COMPLETE" —text "Back-up is now complete."
exit
fi





