SlideShare a Scribd company logo
SCHEDULE BACKUP TO GOOGLE
DRIVE USING CRONTAB
WHAT IS BACKUP ????
• A backup, or data backup is a copy of computer data taken and stored
elsewhere so that it may be used to restore the original after a data
loss event.
• Backups can be used to recover data after its loss from data
deletion or corruption, or to recover data .
• Storage media
• Magnetic tape
• Hard disk
• Optical storage
• Solid-state drive
• Remote backup service
BEFORE CRONTAB
• MANUAL BACKUP:
• you manually backup the website every time you feel it’s
necessary.
• Depending on which service you go for, there are specific
instructions and ways of backing up the website. Another form
of manual backup is manually downloading and creating
backups for all your files and data.
CRONTAB IN LINUX
• The crontab is a list of commands that you want to run on a regular
schedule, and also the name of the command used to manage that list.
STEP 1: INSTALL AND OPEN GNOME
ONLINE ACCOUNTS
• Open the Ubuntu command line, the Terminal, either
through the system Dash or the Ctrl+Alt+T shortcut. Once
the Terminal application opens, enter the following
command as sudo:
$ sudo apt install gnome-online-accounts
• In case it is not installed, the system might prompt you with
a y/n option to confirm initiating the installation procedure.
Please enter Y and then hit Enter to continue.
• Once the utility is installed on yoursystem, you can open it
through one of the following methods:
• By entering the following command in your Terminal:
$gnome-control-center online-accounts
STEP 2: ADD YOUR GOOGLE ACCOUNT
TO THE ONLINE ACCOUNTS
• Once you have opened the Online Accounts utility,
you will be able to see a list of online apps whose
account you can configure to be used through Ubuntu.
In our case, we want to access the Google Drive
account so we need to add our Google account to the
list of online accounts. To do so, click on the Google
option from the list. Please make sure that you are
connected to the internet.
Enter your Gmail ID on which you are using Google Drive and then hit Enter. This
will open the following view for you to enter the Password for this Gmail account:
Enter your password and hit Enter. The following dialog
will appear:
Through this dialog, you will be able to view the list of permissions you are
allowing GNOME, or your local system, over your Google Drive.
Click the Allow button in order to give your Gnome access to your Google Drive.
This will open the following dialog for you:
GOOGLE DRIVE VIA GOOGLE-DRIVE-
OCAMLFUSE PPA
• In case from any reason the above access to your
Google Drive fails using GNOME Online
Accounts you can install google-drive-ocamlfuse by
executing the below commands:
$ sudo add-apt-repository ppa:alessandro-strada/ppa
$ sudo apt install google-drive-ocamlfuse
• Next, create a directory which you want to use to access
your Google Drive files. For example, create google-
drive directory within your user local directory:
$ mkdir ~/google-drive
• At this stage, point google-drive-ocamlfuse to this
newly created directory:
$ google-drive-ocamlfuse
SCHEDULE BACKUP TO GOOGLE
DRIVE FOR EVERY 5 MINS OR HOURS
OR MONTHS
1.Execute a cron job every 5 Minutes
• The first field is for Minutes. If you specify * in this
field, it runs every minutes. If you specify */5 in the
1st field, it runs every 5 minutes as shown below.
*/5 * * * * /home/folder/backup.sh
Min Hour DOM Month DOW
2. Execute a cron job every 5 Hours
• The second field is for hours. If you specify * in this
field, it runs every hour. If you specify */5 in the 2nd
field, it runs every 5 hours as shown below.
0 */5 * * * /home/folder/backup.sh
Note: In the same way, use */2 for every 2 hours, */3 for
every 3 hours, */4 for every 4 hours, etc.
3.Execute a job every 5th weekday
• This example is not about scheduling “every 5 days”.
But this is for scheduling “every 5th weekday”.
• The 5th field is DOW (day of the week). If you specify
* in this field, it runs every day. To run every Friday,
specify either 5 of Fri in this field.
• The following example runs the backup.sh every Friday
at midnight.
0 0 * * 5 /home/ramesh/backup.sh
(or)
0 0 * * Fri /home/ramesh/backup.sh
You can either user number or the corresponding three
letter acronym for the weekday as shown below.
• 0=Sun
• 1=Mon
• 2=Tue
• 3=Wed
• 4=Thu
• 5=Fri
• 6=Sat
• The third field is for DOM (Day of the Month). If you specify * in this
field, it runs every day of the month. If you specify 1 in this month,
it runs 1st of the month.
• The following example runs the backup.sh twice a year. i.e 1st May
at midnight, and 1st Oct at midnight.
0 0 1 5,10 * /home/ramesh/backup.sh
(or)
0 0 1 May,Oct * /home/ramesh/backup.sh
CODE TO BACKUP FOR GDRIVE
• Mysqldump –u root -p cit > /home/cit/google-drive
• Save this in .sh file
SCHEDULE BACKUP
CRONETAB –E
CONCLUSION
• It’s fast
• It’s secure
• Recovery is easy

More Related Content

What's hot

Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
Dennis Rowe
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
Tu Pham
 
Semi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-TidySemi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-Tidy
Markus Werle
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & Infographics
Thomas Poetter
 
Q2.12: Debugging with GDB
Q2.12: Debugging with GDBQ2.12: Debugging with GDB
Q2.12: Debugging with GDB
Linaro
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
DevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit TestsDevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit Tests
Puma Security, LLC
 
自動化ハンズオン
自動化ハンズオン自動化ハンズオン
自動化ハンズオン
VirtualTech Japan Inc.
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
Chris Simmonds
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
Pavan Gupta
 
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_bootGrails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Toshiaki Maki
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
Batyr Nuryyev
 
Jenkins
JenkinsJenkins
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
ColCh
 
GitHub Actions in action
GitHub Actions in actionGitHub Actions in action
GitHub Actions in action
Oleksii Holub
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
Scrum gathering Paris 2013 -  test automation strategy for Scrum ProjectsScrum gathering Paris 2013 -  test automation strategy for Scrum Projects
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
Eliane Collins
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorial
jeetendra mandal
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.
Deepak Singhvi
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 

What's hot (20)

Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
 
Semi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-TidySemi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-Tidy
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & Infographics
 
Q2.12: Debugging with GDB
Q2.12: Debugging with GDBQ2.12: Debugging with GDB
Q2.12: Debugging with GDB
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 
DevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit TestsDevSecOps: Let's Write Security Unit Tests
DevSecOps: Let's Write Security Unit Tests
 
自動化ハンズオン
自動化ハンズオン自動化ハンズオン
自動化ハンズオン
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_bootGrails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_boot
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Jenkins
JenkinsJenkins
Jenkins
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
GitHub Actions in action
GitHub Actions in actionGitHub Actions in action
GitHub Actions in action
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
 
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
Scrum gathering Paris 2013 -  test automation strategy for Scrum ProjectsScrum gathering Paris 2013 -  test automation strategy for Scrum Projects
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorial
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 

Similar to schedule backup to google drive using Crontab and introdction to crontab

(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104
Arie Bregman
 
How to install Chromixium 0.7a
How to install Chromixium 0.7aHow to install Chromixium 0.7a
How to install Chromixium 0.7a
RichJack
 
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
Ted Whittemore
 
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
Adeline Wong
 
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
Adeline Wong
 
Ubuntu alternate ubuntu installation
Ubuntu alternate ubuntu installationUbuntu alternate ubuntu installation
Ubuntu alternate ubuntu installation
arunkumar sadhasivam
 
Front end development gurant
Front end development gurantFront end development gurant
Front end development gurant
marwa Ayad Mohamed
 
Cronjob
CronjobCronjob
Cronjob
Niraj Kumar
 
cronjob-180822194232-1.pdf
cronjob-180822194232-1.pdfcronjob-180822194232-1.pdf
cronjob-180822194232-1.pdf
GumanSingh10
 
Odoo V8 Installation
Odoo V8 InstallationOdoo V8 Installation
Odoo V8 Installation
Emipro Technologies Pvt. Ltd.
 
Format, Partition, Install OS
Format, Partition, Install OSFormat, Partition, Install OS
Format, Partition, Install OS
Sef Cambaliza
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
Ahmed El-Arabawy
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 
User practical
User practicalUser practical
User practical
Muuluu
 
OS_lab_file.pdf
OS_lab_file.pdfOS_lab_file.pdf
OS_lab_file.pdf
KarthickS942388
 
Move Windows 10 Installation to SSD without Reinstalling without Data Loss
Move Windows 10 Installation to SSD without Reinstalling without Data LossMove Windows 10 Installation to SSD without Reinstalling without Data Loss
Move Windows 10 Installation to SSD without Reinstalling without Data Loss
moli he
 
Linux
LinuxLinux
Linux
Yogesh Ks
 
Operating Systems: Memory Management
Operating Systems: Memory ManagementOperating Systems: Memory Management
Operating Systems: Memory Management
Damian T. Gordon
 

Similar to schedule backup to google drive using Crontab and introdction to crontab (20)

(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104
 
How to install Chromixium 0.7a
How to install Chromixium 0.7aHow to install Chromixium 0.7a
How to install Chromixium 0.7a
 
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
Take Care of Your Computer Part 2 -- Backup, Clone Your System Disk Feb-16-2012
 
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
CloudBacko Lite Quickstart Guide (Essential Steps to Get Started)
 
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
CloudBacko Home Quickstart Guide (Essential Steps to Get Started)
 
Ubuntu alternate ubuntu installation
Ubuntu alternate ubuntu installationUbuntu alternate ubuntu installation
Ubuntu alternate ubuntu installation
 
Front end development gurant
Front end development gurantFront end development gurant
Front end development gurant
 
Linux crontab
Linux crontabLinux crontab
Linux crontab
 
Cronjob
CronjobCronjob
Cronjob
 
cronjob-180822194232-1.pdf
cronjob-180822194232-1.pdfcronjob-180822194232-1.pdf
cronjob-180822194232-1.pdf
 
Odoo V8 Installation
Odoo V8 InstallationOdoo V8 Installation
Odoo V8 Installation
 
Format, Partition, Install OS
Format, Partition, Install OSFormat, Partition, Install OS
Format, Partition, Install OS
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
User practical
User practicalUser practical
User practical
 
OS_lab_file.pdf
OS_lab_file.pdfOS_lab_file.pdf
OS_lab_file.pdf
 
Move Windows 10 Installation to SSD without Reinstalling without Data Loss
Move Windows 10 Installation to SSD without Reinstalling without Data LossMove Windows 10 Installation to SSD without Reinstalling without Data Loss
Move Windows 10 Installation to SSD without Reinstalling without Data Loss
 
Linux
LinuxLinux
Linux
 
Operating Systems: Memory Management
Operating Systems: Memory ManagementOperating Systems: Memory Management
Operating Systems: Memory Management
 

Recently uploaded

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 

Recently uploaded (20)

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 

schedule backup to google drive using Crontab and introdction to crontab

  • 1. SCHEDULE BACKUP TO GOOGLE DRIVE USING CRONTAB
  • 2. WHAT IS BACKUP ???? • A backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. • Backups can be used to recover data after its loss from data deletion or corruption, or to recover data . • Storage media • Magnetic tape • Hard disk • Optical storage • Solid-state drive • Remote backup service
  • 3. BEFORE CRONTAB • MANUAL BACKUP: • you manually backup the website every time you feel it’s necessary. • Depending on which service you go for, there are specific instructions and ways of backing up the website. Another form of manual backup is manually downloading and creating backups for all your files and data.
  • 4. CRONTAB IN LINUX • The crontab is a list of commands that you want to run on a regular schedule, and also the name of the command used to manage that list.
  • 5.
  • 6. STEP 1: INSTALL AND OPEN GNOME ONLINE ACCOUNTS • Open the Ubuntu command line, the Terminal, either through the system Dash or the Ctrl+Alt+T shortcut. Once the Terminal application opens, enter the following command as sudo: $ sudo apt install gnome-online-accounts
  • 7. • In case it is not installed, the system might prompt you with a y/n option to confirm initiating the installation procedure. Please enter Y and then hit Enter to continue. • Once the utility is installed on yoursystem, you can open it through one of the following methods: • By entering the following command in your Terminal: $gnome-control-center online-accounts
  • 8. STEP 2: ADD YOUR GOOGLE ACCOUNT TO THE ONLINE ACCOUNTS • Once you have opened the Online Accounts utility, you will be able to see a list of online apps whose account you can configure to be used through Ubuntu. In our case, we want to access the Google Drive account so we need to add our Google account to the list of online accounts. To do so, click on the Google option from the list. Please make sure that you are connected to the internet.
  • 9.
  • 10. Enter your Gmail ID on which you are using Google Drive and then hit Enter. This will open the following view for you to enter the Password for this Gmail account:
  • 11. Enter your password and hit Enter. The following dialog will appear:
  • 12. Through this dialog, you will be able to view the list of permissions you are allowing GNOME, or your local system, over your Google Drive. Click the Allow button in order to give your Gnome access to your Google Drive. This will open the following dialog for you:
  • 13.
  • 14. GOOGLE DRIVE VIA GOOGLE-DRIVE- OCAMLFUSE PPA • In case from any reason the above access to your Google Drive fails using GNOME Online Accounts you can install google-drive-ocamlfuse by executing the below commands: $ sudo add-apt-repository ppa:alessandro-strada/ppa $ sudo apt install google-drive-ocamlfuse
  • 15. • Next, create a directory which you want to use to access your Google Drive files. For example, create google- drive directory within your user local directory: $ mkdir ~/google-drive • At this stage, point google-drive-ocamlfuse to this newly created directory: $ google-drive-ocamlfuse
  • 16. SCHEDULE BACKUP TO GOOGLE DRIVE FOR EVERY 5 MINS OR HOURS OR MONTHS 1.Execute a cron job every 5 Minutes • The first field is for Minutes. If you specify * in this field, it runs every minutes. If you specify */5 in the 1st field, it runs every 5 minutes as shown below. */5 * * * * /home/folder/backup.sh Min Hour DOM Month DOW
  • 17. 2. Execute a cron job every 5 Hours • The second field is for hours. If you specify * in this field, it runs every hour. If you specify */5 in the 2nd field, it runs every 5 hours as shown below. 0 */5 * * * /home/folder/backup.sh Note: In the same way, use */2 for every 2 hours, */3 for every 3 hours, */4 for every 4 hours, etc.
  • 18. 3.Execute a job every 5th weekday • This example is not about scheduling “every 5 days”. But this is for scheduling “every 5th weekday”. • The 5th field is DOW (day of the week). If you specify * in this field, it runs every day. To run every Friday, specify either 5 of Fri in this field. • The following example runs the backup.sh every Friday at midnight. 0 0 * * 5 /home/ramesh/backup.sh (or) 0 0 * * Fri /home/ramesh/backup.sh
  • 19. You can either user number or the corresponding three letter acronym for the weekday as shown below. • 0=Sun • 1=Mon • 2=Tue • 3=Wed • 4=Thu • 5=Fri • 6=Sat
  • 20. • The third field is for DOM (Day of the Month). If you specify * in this field, it runs every day of the month. If you specify 1 in this month, it runs 1st of the month. • The following example runs the backup.sh twice a year. i.e 1st May at midnight, and 1st Oct at midnight. 0 0 1 5,10 * /home/ramesh/backup.sh (or) 0 0 1 May,Oct * /home/ramesh/backup.sh
  • 21. CODE TO BACKUP FOR GDRIVE • Mysqldump –u root -p cit > /home/cit/google-drive • Save this in .sh file
  • 23. CONCLUSION • It’s fast • It’s secure • Recovery is easy