Hello, i need some help to create simple Linux Bash Script
The script should do:
Block 1:
1 - Create local folder with current date
mkdir -p /backups and mkdir -p /backups/$(date +%d-%m-%Y) DONE
1 - Create remote folder using sftp with autologin with current date
Block 2:
2 - Read all folders of /var/www
ls /var/www/ | while read d DONE
3 - Compress with [login to view URL] only the first folder found in /var/www and put it on /backups/today data (I NEED THIS)
4 - Send the [login to view URL] file using sftp with autologin to remote folder with current date
5 - Create a a mysql dump of website and compress it
6 - Upload it to the same folder with same upload method that step 4
7 - Remove local [login to view URL] of mysql dump and folder backup
Block 3:
Repeat block 2 until there arent more folders to backup
-------------------
I'll talk with you via chat every time to provide more information
I need the script in bash, becouse i'll install it in my server
The project ends if i get the bash script fully working
I am a Linux system administrator who writes a lot of BASH shell scripts. I can write a BASH script that meets your requirements with a 24 hour turn around time from the time I start. I wrote a lot of backup scripts during my 20 years of Linux experience. .