0

I just wanted to ask how I can run my backup script that is used for backing up my Tellico databases using one script to kick off the database backups located in different direcotories at the same time.

I have multiple directories housing my different databases all residing under /home/user/Database/Tellico/.

For example:

/home/jeff/Database/Tellico/MyBoooks/Software-Backup.sh
/home/jeff/Database/Tellico/Tellico-MyHardware/MyHardware-Backup.sh
/home/jeff/Database/Tellico/Tellico-MySubscriptions/MySubscriptionstc-Backup.sh

I would like to be able to run all the Backup.sh scripts from one location or one script.
What can I use to do this?
The code for my backup script as an example is the following:

#!/bin/bash  
# Modified on 12/02/2019
#Database/Tellico/Tellico-MySubscriptions
#new item is move to backdir   
# ver 4.0
   echo   
        DateTimeStamp=$(date '+%d-%m-%y-%H:%M')  
      # FileName=$MySubscriptions
    cp MySubscriptions ${DateTimeStamp}-MySubscriptions
    mv ${DateTimeStamp}-MySubscriptions ~/Database/Tellico/Tellico-MySubscriptions/Backups
zx485
  • 2,426
jr223
  • 131

1 Answers1

0
  1. Make sure all your scrips are executable.
  2. Make one new script in which you can execute your other scripts, let's call it backup_all.sh and save it in the dictionary /home/jeff/:
#!/bin/bash
./Database/Tellico/MyBoooks/Software-Backup.sh
./Database/Tellico/Tellico-MyHardware/MyHardware-Backup.sh 
./Database/Tellico/Tellico-MySubscriptions/MySubscriptionstc-Backup.sh
  1. chmod +x backup_all.sh
  2. Backup everything by running ./backup_all.sh from the dictionary where you saved it (/home/jeff/).

Another option might be to make all your files executable from anywhere.

A fun feature might be to add the command ./backup_all.sh a shortkey in Settings. Then you could just press alt+B for example to backup everything.

Mees
  • 65