{"id":382,"date":"2025-11-30T23:22:18","date_gmt":"2025-11-30T23:22:18","guid":{"rendered":"https:\/\/sites.wp.odu.edu\/dberr012\/?p=382"},"modified":"2025-11-30T23:22:18","modified_gmt":"2025-11-30T23:22:18","slug":"cyse270-assignment-9","status":"publish","type":"post","link":"https:\/\/sites.wp.odu.edu\/dberr012\/2025\/11\/30\/cyse270-assignment-9\/","title":{"rendered":"CYSE270 Assignment 9"},"content":{"rendered":"\n<p><strong>Task A &#8211; Backup your system (Using crontab)<\/strong><\/p>\n\n\n\n<p><strong>Scenario: Performing system backup can be time-consuming, and the process is often<\/strong><\/p>\n\n\n\n<p><strong>overlooked. For this scenario:<\/strong><\/p>\n\n\n\n<p><strong>1. Create a new user Alice (with home directory).<\/strong><\/p>\n\n\n\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/916b04ba-9ce5-4b52-b7d2-738031cd416f\" width=\"487\" height=\"305\"><\/li>\n<\/ul>\n\n\n\n<p><strong>2. Write a shell script that backups Alice\u2019s home directory by creating a<\/strong><\/p>\n\n\n\n<p><strong>tar file (tape archive), using the following steps:<\/strong><\/p>\n\n\n\n<p><strong>a. Do the following:<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>Take 2 inputs with their values- your MIDAS name and current date (for example, midas=Mohammed).<\/strong>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/f17bb49d-0570-40bb-80f1-b6f8414a9e69\" width=\"488\" height=\"306\"><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Create a variable named as filename that should be assigned the value as MIDAS-date (example output after executing the script would be like, <\/strong><a href=\"http:\/\/mohammed-2024.11.04-22.08.01.tar.gz\"><strong>Mohammed-2024.11.04-22.08.01.tar.gz<\/strong><\/a><strong>).<\/strong>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/14ffb1ee-84e9-444a-a50b-8d27ef4b180c\" width=\"404\" height=\"253\"><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Using tar command, create a tape archive for Alice\u2019s home directory (\/home\/Alice) and the filename created above (in step-2-ii). (Please learn about tar command in Linux for its usage)<\/strong>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/dcde6eac-d72a-4acb-981b-cecc64a6ba6c\" width=\"500\" height=\"236\"><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>b. Move the tape archive file\/tar file (created in step 2-iii) to \/var\/backups\/ directory using the correct command in linux.<\/strong><\/p>\n\n\n\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/c551e1f2-0f35-42f9-b1f3-660b3adb34f7\" width=\"466\" height=\"292\"><\/li>\n<\/ul>\n\n\n\n<p><strong>c. To optimize the disk usage, pick a compression algorithm (bz2, gzip, or xv) to<\/strong><\/p>\n\n\n\n<p><strong>compress the tar file you created in \/var\/backups\/ in the previous step-2b.<\/strong><\/p>\n\n\n\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/2a1e9d37-ed65-402e-ad7d-d56756116f9b\" width=\"434\" height=\"227\"><\/li>\n<\/ul>\n\n\n\n<p><strong>3. Create a crontab file to keep the scheduled task running for 3 minutes, then check the contents in the \/var\/backups directory.<\/strong><\/p>\n\n\n\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/8e5f8c47-ebbe-4079-a41b-b88f94142423\" width=\"394\" height=\"247\"><\/li>\n<\/ul>\n\n\n\n<p><strong>4. Cancel the crontab jobs.<\/strong><\/p>\n\n\n\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sites.wp.odu.edu\/dd22a4d0-b037-4375-9064-89a701963f43\" width=\"400\" height=\"217\"><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Task A &#8211; Backup your system (Using crontab) Scenario: Performing system backup can be time-consuming, and the process is often overlooked. For this scenario: 1. Create a new user Alice (with home directory). 2. Write a shell script that backups Alice\u2019s home directory by creating a tar file (tape archive), using the following steps: a&#8230;. <\/p>\n<div class=\"link-more\"><a href=\"https:\/\/sites.wp.odu.edu\/dberr012\/2025\/11\/30\/cyse270-assignment-9\/\">Read More<\/a><\/div>\n","protected":false},"author":30971,"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\/dberr012\/wp-json\/wp\/v2\/posts\/382"}],"collection":[{"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/users\/30971"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":1,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"predecessor-version":[{"id":383,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/posts\/382\/revisions\/383"}],"wp:attachment":[{"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/dberr012\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}