Make copy of file and copy to Server

From rbachwiki
Revision as of 15:06, 15 June 2023 by Bacchas (talk | contribs)
Jump to navigation Jump to search
#!/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