SlideShare a Scribd company logo
1 of 23
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 (20)

Hydrotherapy for Physiotherapy.pptx
Hydrotherapy for Physiotherapy.pptxHydrotherapy for Physiotherapy.pptx
Hydrotherapy for Physiotherapy.pptx
 
rheumatoid arthritis.
rheumatoid arthritis.rheumatoid arthritis.
rheumatoid arthritis.
 
Shoulder joint Bio-Mechanics and Sports Specific Rehabilitation
Shoulder joint Bio-Mechanics and Sports Specific RehabilitationShoulder joint Bio-Mechanics and Sports Specific Rehabilitation
Shoulder joint Bio-Mechanics and Sports Specific Rehabilitation
 
Bio-mechanics of the wrist joint
Bio-mechanics of the wrist jointBio-mechanics of the wrist joint
Bio-mechanics of the wrist joint
 
Ligament injuries of knee
Ligament injuries of knee Ligament injuries of knee
Ligament injuries of knee
 
Biomechanics spine
Biomechanics spineBiomechanics spine
Biomechanics spine
 
tendon release therapy(1).pptx
tendon release therapy(1).pptxtendon release therapy(1).pptx
tendon release therapy(1).pptx
 
Physical therapist career
Physical therapist careerPhysical therapist career
Physical therapist career
 
Biomechanich of the spine ppt (2)
Biomechanich of the spine ppt (2)Biomechanich of the spine ppt (2)
Biomechanich of the spine ppt (2)
 
Tennis elbow(le)
Tennis elbow(le)Tennis elbow(le)
Tennis elbow(le)
 
Physical therapy
Physical therapyPhysical therapy
Physical therapy
 
biomechanics of respiration.pptx
biomechanics of respiration.pptxbiomechanics of respiration.pptx
biomechanics of respiration.pptx
 
Muscle Energy Technique
Muscle Energy TechniqueMuscle Energy Technique
Muscle Energy Technique
 
BIOMECHANICS OF THE ANKLE JOINT
BIOMECHANICS  OF THE ANKLE JOINTBIOMECHANICS  OF THE ANKLE JOINT
BIOMECHANICS OF THE ANKLE JOINT
 
Range of motion chap 3
Range of motion chap 3Range of motion chap 3
Range of motion chap 3
 
Knee biomechanics
Knee biomechanicsKnee biomechanics
Knee biomechanics
 
Biomechanics of shoulder
Biomechanics of shoulderBiomechanics of shoulder
Biomechanics of shoulder
 
Vertebral manipulation (2)
Vertebral manipulation (2)Vertebral manipulation (2)
Vertebral manipulation (2)
 
Manual therapy.pps
Manual therapy.ppsManual therapy.pps
Manual therapy.pps
 
BIOMECHANICS OF ELBOW COMPLEX
BIOMECHANICS OF ELBOW COMPLEXBIOMECHANICS OF ELBOW COMPLEX
BIOMECHANICS OF ELBOW COMPLEX
 

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

(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104Arie Bregman
 
How to install Chromixium 0.7a
How to install Chromixium 0.7aHow to install Chromixium 0.7a
How to install Chromixium 0.7aRichJack
 
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-2012Ted 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 installationarunkumar sadhasivam
 
cronjob-180822194232-1.pdf
cronjob-180822194232-1.pdfcronjob-180822194232-1.pdf
cronjob-180822194232-1.pdfGumanSingh10
 
Format, Partition, Install OS
Format, Partition, Install OSFormat, Partition, Install OS
Format, Partition, Install OSSef 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
 
User practical
User practicalUser practical
User practicalMuuluu
 
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 Lossmoli he
 
Operating Systems: Memory Management
Operating Systems: Memory ManagementOperating Systems: Memory Management
Operating Systems: Memory ManagementDamian 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

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

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