Difference between revisions of "Make copy of file and copy to Server"

From rbachwiki
Jump to navigation Jump to search
(Created page with " <pre> #!/bin/bash clear echo -e " +++++ Making a backup copy of sql file in the web folder ++++++++++++++++ \n" ansible-playbook /etc/ansible/playbook/backupsqlfirst.yml sleep 5 echo -e "++++++++++ Copying to local web folder ++++++++++++++ \n" ansible-playbook /etc/ansible/playbook/cplocal.yml sleep 5 ansible-playbook /etc/ansible/playbook/copytorb222.yml --private-key ~/.ssh/ansible echo "+++++ Done ++++++" </pre> <h4 class="bluebackground">backup...")
 
Line 25: Line 25:
         dest: /mnt/c/Users/sales/Dropbox (Personal)/All Folders/websites/linode_msites/sb222/datab/sqLite_karaoke_backup.sql
         dest: /mnt/c/Users/sales/Dropbox (Personal)/All Folders/websites/linode_msites/sb222/datab/sqLite_karaoke_backup.sql
</pre>
</pre>
<h4 class="bluebackground">/cplocal.yml</h4>

Revision as of 15:06, 15 June 2023

#!/bin/bash
clear
echo -e " +++++ Making a backup copy of sql file in the web folder ++++++++++++++++ \n"
ansible-playbook /etc/ansible/playbook/backupsqlfirst.yml
sleep 5
echo -e "++++++++++ Copying to local web folder ++++++++++++++ \n"
ansible-playbook /etc/ansible/playbook/cplocal.yml
sleep 5
ansible-playbook  /etc/ansible/playbook/copytorb222.yml --private-key ~/.ssh/ansible
echo "+++++         Done            ++++++"

backupsqlfirst.yml

---
- name: make backup copy of sql file
  hosts: localhost

  tasks:
    - name: make a backup copy of sqlite file
      copy:
        src: /mnt/c/Users/sales/Dropbox (Personal)/All Folders/websites/linode_msites/sb222/datab/sqLite_karaoke.sql
        dest: /mnt/c/Users/sales/Dropbox (Personal)/All Folders/websites/linode_msites/sb222/datab/sqLite_karaoke_backup.sql

/cplocal.yml