{"id":350,"date":"2025-11-24T15:23:59","date_gmt":"2025-11-24T15:23:59","guid":{"rendered":"https:\/\/sites.wp.odu.edu\/zsumu001\/?p=350"},"modified":"2025-11-30T12:11:56","modified_gmt":"2025-11-30T12:11:56","slug":"assignment-assignment-9-task-automation","status":"publish","type":"post","link":"https:\/\/sites.wp.odu.edu\/zsumu001\/2025\/11\/24\/assignment-assignment-9-task-automation\/","title":{"rendered":"Assignment 9 &#8211; Task Automation"},"content":{"rendered":"\n<p>Task A &#8211; Backup your system (Using crontab) [100 points]<br>Scenario: Performing system backup can be time-consuming, and the process is often<br>overlooked. For this scenario:<br>1. (10 Points) Create a new user Alice (with home directory).<br>2. (50 Points) Write a shell script that backups Alice\u2019s home directory by creating a<br>tar file (tape archive), using the following steps:<br>a. Do the following:<br>\u2022 Take 2 inputs with their values- your MIDAS name and current date<br>(for example, midas=Mohammed).<br>\u2022 Create a variable named as filename that should be assigned the<br>value as MIDAS-date (example output after executing the script<br>would be like, Mohammed-2024.11.04-22.08.01.tar.gz).<br>\u2022 Using tar command, create a tape archive for Alice\u2019s home directory<br>(\/home\/Alice) and the filename created above (in step-2-ii). (Please<br>learn about tar command in Linux for its usage)<br>b. Move the tape archive file\/tar file (created in step 2-iii) to \/var\/backups\/<br>directory using correct command in linux.<br>c. To optimize the disk usage, pick a compression algorithm (bz2, gzip, or xv) to<br>compress the tar file you created in \/var\/backups\/ in the previous step-2b.<br>3. (30 Points) Create a crontab file to keep the scheduled task running for 3<br>minutes, then check the contents in the \/var\/backups directory.<br>4. (10 Points) Cancel the crontab jobs.<\/p>\n\n\n\n<p>Reflection<br>This lab gave me experience with automating system backups using a shell script and scheduling task with crontab.  A challenge I faced was setting up the cron job to automate the backup, but testing it and ensuring the scheduled task ran correctly helped reinforce my understanding of cron syntax.<\/p>\n\n\n\n<div data-wp-interactive=\"\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!selectors.core.file.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-content\/uploads\/sites\/31974\/2025\/11\/CYSE270ASSIGNMENT9.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of CYSE270ASSIGNMENT9.\"><\/object><a id=\"wp-block-file--media-93b7f3ae-9c9e-4992-9b4d-a9d90600307b\" href=\"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-content\/uploads\/sites\/31974\/2025\/11\/CYSE270ASSIGNMENT9.pdf\">CYSE270ASSIGNMENT9<\/a><a href=\"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-content\/uploads\/sites\/31974\/2025\/11\/CYSE270ASSIGNMENT9.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-93b7f3ae-9c9e-4992-9b4d-a9d90600307b\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Task A &#8211; Backup your system (Using crontab) [100 points]Scenario: Performing system backup can be time-consuming, and the process is oftenoverlooked. For this scenario:1. (10 Points) Create a new user <a class=\"more-link\" href=\"https:\/\/sites.wp.odu.edu\/zsumu001\/2025\/11\/24\/assignment-assignment-9-task-automation\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":25872,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","wds_primary_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/posts\/350"}],"collection":[{"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/users\/25872"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":4,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/posts\/350\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/zsumu001\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}