
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question

Transcribed Image Text:QUESTION 2: A Backup Script
Write a script called: backup SWITCH FILES DEST MESSAGE
Example: ./backup -D ~/source/*.c ~/backup
Where:
SWITCH is optional: -D for deleting original files after backup. If not
present, the original files to be backed-up are not deleted.
FILES is the path, using wild cards, of the files to be backed-up.
DEST is the path to the backup directory.
MESSAGE is a multiword description about the backup. It will be added to a log
file.
Use vi to create the script.
The script must do the following in the order presented:
1. Make sure the script is running under Bash.
2.
Verify that the script has the correct number of arguments. If it does not the script
must terminate with the following error message: "You have the incorrect number
of arguments. The correct syntax is: ./backup SWITCH FILES DEST MESSAGE.
Please try again."
3. Verify that the DEST directory exists. If it does exist, then do nothing. If it does
not exist, then create the directory.
4. Using the TAR command, backup all the FILES to DEST. Call the backup file
name: "backupDATE.tar". Where DATE is today's date (not time).
5. CHMOD the tar file as RW for only the owner.
6. Append to a logfile called "backups.log" the MESSAGE preceded by todays date
and time. This logfile is within the backup directory. The format of this log
message is: DATE TIME MESSAGE. It is all on one line. Each time the backup
script is called a new log is appended to this file.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 5 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Creating Directories (Folders), Subdirectories, and Files Open the CMD window Move to the upper most directory (the root): CD\ Create a new directory and name it as: YourLastName Change directory to YourLastName : CD YourLastName Inside YourLastName directory create the following Subdirectories: CIS100 CIS115 CIS120 CIS165 CIS200…arrow_forwardWhen the data has been, it can be reused in a new file. O copied embedded Imported Minkedarrow_forwardTests on a working reference monitor that has poor defenses. (0.0/9.0) Tests on a working reference monitor that has an issue with file lengths. (0.0/13.5) no hand writtenarrow_forward
- Instruction:all paths should be in absolute paths and all commands must be run as sysadmin users, it shouldn't run as a root user. QuestionsQ01) Create a folder named FinalTest under the root of the Linux file system. Q02) Change the ownership of the FinalTest folder to user sysadmin and group sysadmin. Q03) Set the permissions on the FinalTest folder so that:- users that are not a sysadmin and not in the sysadmin group would be able to move into the folder as well as to view and create folders in that folder.- only the owners of files/folders be able to delete files/folders that are in that folder. Q04) Use the sysadmin user and the output redirection to create a text file named grep-man in the FinalTest folder that would contain the help documentation for the grep command. Q05) Change the permissions of the grep-man file so that the user can read, write, and execute, the group can read, and the others can read and execute content. Answer: a) using letters: b) using octal values:…arrow_forwardWhat happens when a file is deleted without going to the recycle bin?arrow_forwardIn Encase, When a status of ____ is shown for a partition it is an active partition. 07h 08h 80h 70harrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education