SlideShare a Scribd company logo
1 of 10
Automating Photo and MySQL backup
Photo backup
Install winSCP whichisusedtotransferfilesfromservertolocal system
Clickon newbutton and enter the detailsas belowlike username and password
Clickon save itwill promptyouto with save as popupgive ansuitable name thisname will be used
while writingscript andchecksave passwordcheckbox and clickon okbuttonthis sessionwill be saved
and savedseverwill be displayed
List of Server will be displayedlike below if youclickonloginbyselectinganyof the server’sitwill
automaticallygetsloggedin (onlyif ucheckedsave passwordcheckbox while savingthe server)
Nowselectsavedsesstion and clickon login itwill automaticallyauthenticate andgetloggedin
Nowsetupthe file structure as belowand save the sessiongoingforsessiontabandselectingsave
sessionthat’s all youneedtodoin winSCPnow we needtowrite script
Note:the file youwantto transfermustbe displayedlike thisinmycase I’mtransferringcustomerphoto
folder
Writingscript to transfer files
/**********Script Starts *************
Optionbatchon
Optionconfirmoff
Open saved sessionname
cd backups
optiontransferbinary
get/customerphoto*roothomeubuntucustomerphoto*
synchronize local D:DropBoxDropboxPortalBackupcustomerphoto customerphoto
/**********Script Ends *************
Copyabove scriptintotextfile andsave itin mycase I have saveditto E:Backupsync.txt
saved sessionname will be savedsession name
roothomeubuntucustomerphoto* folderpathinthe server
D:DropBoxDropboxlBackupcustomerphoto Local systempath
get /customerphoto* Thiswill workas an tempvariable
Schedulinga task inwindows machine to trigger an event
Note : local pathmust be present i.e. ..D:DropBoxDropboxPortalBackupcustomerphoto must
be present
Control panel >system and security> Administrative tools>Task Scheduler
Clickon create basic task
Enter name anddescriptionandclickonnext
In nexttabselectintervalstotrigger i.e...dailyorweeklyetcin nexttabsetuptime totrigger
In nexttabselectstarta programand clickon next
In start a program tab clickon browse buttonopen Cdrive >program Files>winSCP>winscp.exe file
In addarguments enterthe script path : /console /script=E:Backupsync.txt /log=E:backuplog.txt
E:Backupsync.txt : isthe pathof the scriptpresent
/log=E:backuplog.txt : path to write the logs
Clickon nextand finishit
All list of tasks will be displayedas above u can test it by starting task right click on task and start it
It will start comparing and syncingthe files fromserver to local
MySQL backup automation
For takingMySQL backupautomaticallyfirstyouneedtosetupcrone jobinthe serverwhichwill
automatically takesdumpandstoresinserver folderfinallywe needtoruna jobfrom local machine
usingwinSCPandtransferthe file tolocal system
Note:fordoingthiswe needto thinkof time difference isserverandlocal forE.g. if your serverisin
GMT and local isin IST youneedto planaccordinglyandsetup
Daily1:30 PM local time serverwill runacorn joband take a backup(note thisservertime will be
different)
Once corn job iscompletedwe needtostartlocal jobfromFTP and transferthisfile tolocal
Login through SSH
Commends
Mkdir mysqlBackup
Cd mysqlBackup/
Sudonano mysqlBackup.sh
A newfile willbe openedlike this
Enter belowcommand thisthatfile andsave thisfile
mysqldump -uroot-p'PASS' DBNAME | gzip> "../mysqlBackup/backup-$(date).sql.gz"2>
../mysqlBackup/dump.log
PASS : is DB pass and root isusername
"../mysqlBackup: thisisthe pathwhere filesmustbe stored
backup-$(date).sql.gz": file name withdate,day,time sothatyou can identifythe files
Note : for savingthisfile youneedsuperuserpermeation
Settingupcorn job
Enter : crontab –e command
List of croneswill be displayed inthe above displaythere are twocronesactive
0 15 * * * /bin/sh/mysqlBackup/mysqlBackup.sh
0 8 * * * /bin/sh/mysqlBackup/mysqlBackup.sh
0 8 * * * and0 15 * * * definestime atwhattime thisjobshouldtriggersthiswilltriggerat8:00 AM and
3:00 PM(Note thisisservertime )
/bin/sh: isthe commandto run .shfiles
/mysqlBackup/mysqlBackup.sh : path ware youhave saved.sh file inmycase I have storedinabove
path
That’s all thisjobswill be triggeredattime specifiedandstoresthe file inthe pathlike this
Nextstepisto transferthisfile tolocal sothat if servergetscrashedbackupwill be presentinlocal
For thisyouneedto followthe stepswe usedtophotobackup
Justchange the scriptlike this
optionbatchon
optionconfirmoff
openMysqlBackup
cd backups
optiontransferbinary
get/mysqlBackup*rootmysqlBackup*
synchronize local D:DropBoxDropboxPortalBackupMySqlDumpmysqlBackup
exit
MysqlBackup: thisis sessionname storedwithpasswordonce openedfolders displayedmustbe like
this
mysqlBackup folder mustbe displayedif notsetitupby savingthe sessiononce thisisdone setupand
task inlocal machine bygivingpathof the scriptas above and setupthe time fortestingucan start that
task youwill getbelowoutput

More Related Content

What's hot

Backing up thousands of containers
Backing up thousands of containersBacking up thousands of containers
Backing up thousands of containersMarian Marinov
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011Graham Weldon
 
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...DataStax Academy
 
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...Magento Meetup Wrocław
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Plain Concepts
 
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 Victoria Malaya
 
Ansible
AnsibleAnsible
Ansiblegnosek
 
Am I Idempotent?
Am I Idempotent?Am I Idempotent?
Am I Idempotent?Dennis Rowe
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsMarcus Frödin
 
Herramientas front
Herramientas frontHerramientas front
Herramientas frontborya09
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Serveraaroncouch
 
EOSIO Slide 2 - Start Servers
EOSIO Slide 2 - Start ServersEOSIO Slide 2 - Start Servers
EOSIO Slide 2 - Start ServersSimon Ho
 
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018DevOpsDays Tel Aviv
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server13bcs0012
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of serversMarian Marinov
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failuresMarian Marinov
 

What's hot (20)

Backing up thousands of containers
Backing up thousands of containersBacking up thousands of containers
Backing up thousands of containers
 
Compressing & decompressing in mule
Compressing & decompressing in muleCompressing & decompressing in mule
Compressing & decompressing in mule
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
 
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...
Cassandra Summit 2014: Down with Tweaking! Removing Tunable Complexity for Ca...
 
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
Magento Meetup Wrocław 6. "Docker for Mac - possible solutions to performance...
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day
 
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
 
Powershell direct
Powershell directPowershell direct
Powershell direct
 
Ansible
AnsibleAnsible
Ansible
 
Am I Idempotent?
Am I Idempotent?Am I Idempotent?
Am I Idempotent?
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
Docker 101 & Workshop
Docker 101 & WorkshopDocker 101 & Workshop
Docker 101 & Workshop
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 
Herramientas front
Herramientas frontHerramientas front
Herramientas front
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
 
EOSIO Slide 2 - Start Servers
EOSIO Slide 2 - Start ServersEOSIO Slide 2 - Start Servers
EOSIO Slide 2 - Start Servers
 
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018
Data Science in DevOps/SysOps - Boaz Shuster - DevOpsDays Tel Aviv 2018
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
 
Managing a lot of servers
Managing a lot of serversManaging a lot of servers
Managing a lot of servers
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failures
 

Viewers also liked

Viewers also liked (14)

Direct Mail
Direct MailDirect Mail
Direct Mail
 
Ahir i avui andrea
Ahir i avui andreaAhir i avui andrea
Ahir i avui andrea
 
Skeptic-EvolPerspChronDis(color)
Skeptic-EvolPerspChronDis(color)Skeptic-EvolPerspChronDis(color)
Skeptic-EvolPerspChronDis(color)
 
Razones
RazonesRazones
Razones
 
Planificador de-proyectos huerta corregido
Planificador de-proyectos huerta corregidoPlanificador de-proyectos huerta corregido
Planificador de-proyectos huerta corregido
 
Ppt
PptPpt
Ppt
 
2011 Rehearsal Collection
2011 Rehearsal Collection2011 Rehearsal Collection
2011 Rehearsal Collection
 
Dancing with my family
Dancing with my familyDancing with my family
Dancing with my family
 
avilean
avileanavilean
avilean
 
Alma recinto how_tousemailchimp
Alma recinto how_tousemailchimpAlma recinto how_tousemailchimp
Alma recinto how_tousemailchimp
 
Brazilian Jiu Jitsu Gi Vs Karate Gi
Brazilian Jiu Jitsu Gi Vs Karate GiBrazilian Jiu Jitsu Gi Vs Karate Gi
Brazilian Jiu Jitsu Gi Vs Karate Gi
 
Dbh 2 a osoa
Dbh 2 a osoaDbh 2 a osoa
Dbh 2 a osoa
 
Choosing a daycare center
Choosing a daycare centerChoosing a daycare center
Choosing a daycare center
 
Prison1
Prison1Prison1
Prison1
 

Similar to Automation m ysql_and_customer_photo

Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guideNaveed Bashir
 
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformDrupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformHector Iribarne
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStackGo Chiba
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsManuel Vega
 
Building cloud stack at scale
Building cloud stack at scaleBuilding cloud stack at scale
Building cloud stack at scaleShapeBlue
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2benjaminwootton
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSharon James
 
Automated shutdown
Automated shutdownAutomated shutdown
Automated shutdownMario Berend
 
GUIDE - Migrating AWS EBS backed AMI's between Regions
GUIDE - Migrating AWS EBS backed AMI's between RegionsGUIDE - Migrating AWS EBS backed AMI's between Regions
GUIDE - Migrating AWS EBS backed AMI's between RegionsRob Linton
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysqlVasudeva Rao
 
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...CloudMinister Technologies Pvt. Ltd
 

Similar to Automation m ysql_and_customer_photo (20)

Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Content server installation guide
Content server installation guideContent server installation guide
Content server installation guide
 
Mysql-Basics.pptx
Mysql-Basics.pptxMysql-Basics.pptx
Mysql-Basics.pptx
 
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformDrupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
 
Mysql
MysqlMysql
Mysql
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStack
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
Building cloud stack at scale
Building cloud stack at scaleBuilding cloud stack at scale
Building cloud stack at scale
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
Automated shutdown
Automated shutdownAutomated shutdown
Automated shutdown
 
GUIDE - Migrating AWS EBS backed AMI's between Regions
GUIDE - Migrating AWS EBS backed AMI's between RegionsGUIDE - Migrating AWS EBS backed AMI's between Regions
GUIDE - Migrating AWS EBS backed AMI's between Regions
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysql
 
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
 
zLAMP
zLAMPzLAMP
zLAMP
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

Automation m ysql_and_customer_photo

  • 1. Automating Photo and MySQL backup Photo backup Install winSCP whichisusedtotransferfilesfromservertolocal system Clickon newbutton and enter the detailsas belowlike username and password
  • 2. Clickon save itwill promptyouto with save as popupgive ansuitable name thisname will be used while writingscript andchecksave passwordcheckbox and clickon okbuttonthis sessionwill be saved and savedseverwill be displayed List of Server will be displayedlike below if youclickonloginbyselectinganyof the server’sitwill automaticallygetsloggedin (onlyif ucheckedsave passwordcheckbox while savingthe server)
  • 3. Nowselectsavedsesstion and clickon login itwill automaticallyauthenticate andgetloggedin Nowsetupthe file structure as belowand save the sessiongoingforsessiontabandselectingsave sessionthat’s all youneedtodoin winSCPnow we needtowrite script Note:the file youwantto transfermustbe displayedlike thisinmycase I’mtransferringcustomerphoto folder Writingscript to transfer files
  • 4. /**********Script Starts ************* Optionbatchon Optionconfirmoff Open saved sessionname cd backups optiontransferbinary get/customerphoto*roothomeubuntucustomerphoto* synchronize local D:DropBoxDropboxPortalBackupcustomerphoto customerphoto /**********Script Ends ************* Copyabove scriptintotextfile andsave itin mycase I have saveditto E:Backupsync.txt saved sessionname will be savedsession name roothomeubuntucustomerphoto* folderpathinthe server D:DropBoxDropboxlBackupcustomerphoto Local systempath get /customerphoto* Thiswill workas an tempvariable Schedulinga task inwindows machine to trigger an event Note : local pathmust be present i.e. ..D:DropBoxDropboxPortalBackupcustomerphoto must be present Control panel >system and security> Administrative tools>Task Scheduler
  • 5. Clickon create basic task Enter name anddescriptionandclickonnext In nexttabselectintervalstotrigger i.e...dailyorweeklyetcin nexttabsetuptime totrigger In nexttabselectstarta programand clickon next In start a program tab clickon browse buttonopen Cdrive >program Files>winSCP>winscp.exe file In addarguments enterthe script path : /console /script=E:Backupsync.txt /log=E:backuplog.txt E:Backupsync.txt : isthe pathof the scriptpresent /log=E:backuplog.txt : path to write the logs
  • 6. Clickon nextand finishit All list of tasks will be displayedas above u can test it by starting task right click on task and start it It will start comparing and syncingthe files fromserver to local
  • 7. MySQL backup automation For takingMySQL backupautomaticallyfirstyouneedtosetupcrone jobinthe serverwhichwill automatically takesdumpandstoresinserver folderfinallywe needtoruna jobfrom local machine usingwinSCPandtransferthe file tolocal system Note:fordoingthiswe needto thinkof time difference isserverandlocal forE.g. if your serverisin GMT and local isin IST youneedto planaccordinglyandsetup Daily1:30 PM local time serverwill runacorn joband take a backup(note thisservertime will be different) Once corn job iscompletedwe needtostartlocal jobfromFTP and transferthisfile tolocal Login through SSH Commends Mkdir mysqlBackup Cd mysqlBackup/ Sudonano mysqlBackup.sh A newfile willbe openedlike this Enter belowcommand thisthatfile andsave thisfile mysqldump -uroot-p'PASS' DBNAME | gzip> "../mysqlBackup/backup-$(date).sql.gz"2> ../mysqlBackup/dump.log
  • 8. PASS : is DB pass and root isusername "../mysqlBackup: thisisthe pathwhere filesmustbe stored backup-$(date).sql.gz": file name withdate,day,time sothatyou can identifythe files Note : for savingthisfile youneedsuperuserpermeation Settingupcorn job Enter : crontab –e command List of croneswill be displayed inthe above displaythere are twocronesactive 0 15 * * * /bin/sh/mysqlBackup/mysqlBackup.sh
  • 9. 0 8 * * * /bin/sh/mysqlBackup/mysqlBackup.sh 0 8 * * * and0 15 * * * definestime atwhattime thisjobshouldtriggersthiswilltriggerat8:00 AM and 3:00 PM(Note thisisservertime ) /bin/sh: isthe commandto run .shfiles /mysqlBackup/mysqlBackup.sh : path ware youhave saved.sh file inmycase I have storedinabove path That’s all thisjobswill be triggeredattime specifiedandstoresthe file inthe pathlike this Nextstepisto transferthisfile tolocal sothat if servergetscrashedbackupwill be presentinlocal For thisyouneedto followthe stepswe usedtophotobackup Justchange the scriptlike this optionbatchon optionconfirmoff openMysqlBackup cd backups optiontransferbinary get/mysqlBackup*rootmysqlBackup* synchronize local D:DropBoxDropboxPortalBackupMySqlDumpmysqlBackup exit
  • 10. MysqlBackup: thisis sessionname storedwithpasswordonce openedfolders displayedmustbe like this mysqlBackup folder mustbe displayedif notsetitupby savingthe sessiononce thisisdone setupand task inlocal machine bygivingpathof the scriptas above and setupthe time fortestingucan start that task youwill getbelowoutput