Question

In: Computer Science

This is unix based server management Part A Steps in the exercise: Write, and verify the...

This is unix based server management

Part A

Steps in the exercise:

Write, and verify the operation of, an rsync command that will perform a differential backup in place of the copy command.

Verify that the rsync process is backing up only the incremental files by running it, then running it again, then adding a new file, and running again.

Include the option in rsync to delete any files that do not exist in the destination directory. Verify this by deleting a file and then running the sync process again.

Revise your cron process to use the rsync command.

Completion of this will require:

Installation of rsync (pkg install rsync).

Research into the man pages or other resources on rsync to discover the appropriate control switches to use to achieve the synchronization.

Submit a text document that describes what you have done, and uses screen shots or other evidence, such as a downloaded log file, display of the user cron, etc., to show how this was completed.


Part B

In this part, you will set up a remote backup to your jail.

Craft an rsync command that will backup up all files and directories, recursively, from your home directory to your jail backup location. Propagate deletes to the remote server.

Create a second cron that automates this backup to your jail. Set up the cron to run every hour. Log the output of the process to a log file that you will set up in /var/log.

Submit a text document that describes what you have done, and uses screen shots or other evidence, such as a downloaded log file, display of the user cron, etc., to show how this was completed.

Solutions

Expert Solution

Part A

create a shell script with any name like backup-files.sh

Rsync by defaault provide increamental files backup i.e it wont backup all the existing files every time this means next time it will backup those files who got modified or some new files got added.

In below command I have used -u flag and --delete flag. -u will say that if files already exist and if existing files has been modified than donot overwrite the file with new data also --delete flag will delete files that donot exist on sender side.
#!/bin/bash
rsync -r -a -v -e -p -u root/home/dir --delete user@IPAddress:/root/jail/dir

while saving this script file make it executive file by using by using command
chmod +X 755 /root/backup-files.sh

to automate this rsync setup we need to create cron job which will run effectively at their schdeduled time


Part B

create a shell script with any name like backup-files.sh

in this shell script we write rsync command to create backup of files and directory from home to jail

#!/bin/bash
rsync -r -a -v -e -p root/home/dir user@IPAddress:/root/jail/dir

while saving this script file make it executive file by using by using command
chmod +X 755 /root/backup-files.sh

to automate this rsync setup we need to create cron job which will run effectively at their schdeduled time

To create your own cron tab use below command

crontab -e

To automate backup-files.sh which will run every hour to backup files and folders we need to write below command in crontab

0 * * * * /root/backup-files.sh


Related Solutions

UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all...
UNIX/LINUX SCRIPT: Create a named directory and verify that the directory is there by listing all its contents. Write a shell script to validate password strength. Here are a few assumptions for the password string.   Length – a minimum of 8 characters. • Contain alphabets , numbers , and @ # $ % & * symbols. • Include both the small and capital case letters. give a prompt of Y or N to try another password and displays an error...
IN LINUX/UNIX 1. Based on the example “awkc7” introduced in the handouts, please write an awk...
IN LINUX/UNIX 1. Based on the example “awkc7” introduced in the handouts, please write an awk script to display the first six records in “loginfile.” Please test your script to make sure the script displays the following information: ics325sp200221 pts/6        75.168.197.229   Wed Apr 29 22:09 - 23:27 (01:17)     ics325sp200221 pts/10       75.168.197.229   Wed Apr 29 22:04 - 22:07 (00:02)     ics325sp200220 pts/10       24.118.187.116   Wed Apr 29 15:28 - 15:30 (00:02)     ics325sp200220 pts/10       24.118.187.116   Wed Apr 29 15:22 - 15:23 (00:00)     ics325sp200222 pts/11      ...
Outline the necessary actions that Server Administrator's must verify for proper operation of servers in the...
Outline the necessary actions that Server Administrator's must verify for proper operation of servers in the event of a failover/redundancy plan.
Windows Server 2016 - Local and Remote Server Management Discuss advantages and disadvantages of managing server...
Windows Server 2016 - Local and Remote Server Management Discuss advantages and disadvantages of managing server installations with images. What are some of the management practices that an organization would implement to insure updates and accurate images? Discuss the importance of proper firewall configurations. If a firewall is configured to allow remote management, how might this affect the security of a server, especially one that is open to the outside world?
What are the UNIX commands for each of these steps? 1. Copy all of the files...
What are the UNIX commands for each of these steps? 1. Copy all of the files in your Files directory to the Backup directory. 2. Create an ITE130 directory in the Classes Directory 3. Move all the ITE 130 files from the backup directory to the ITE130 directory. 4. Redirect echo step 19 to mark this step in the lab3.txt file 5. Display all of the directories and sub-directories including files so I can verify you completed all the above...
What are the UNIX commands for each of these steps? 1. Delete all the files in...
What are the UNIX commands for each of these steps? 1. Delete all the files in the Classes and Backup directories only. 2. Redirect echo step 23 to mark this step in the lab3.txt file 3. Display all of the directories and sub-directories including files so I can verify you completed all the steps correctly. 4. Repeat the above step and redirect the output to the file lab3.txt without erasing what is already in it! 5. Redirect echo step 26...
Socket-based Java server program
Write a Socket-based Java server program that responds to client messages as follows: When it receives a message from a client, it simply converts all the letters into ASCII characters and sends back them to the client. Write both client and server programs demonstrating this.
Discuss different service-based server operating systems, server computers, and server software that a network administrator must...
Discuss different service-based server operating systems, server computers, and server software that a network administrator must choose between. Applied Concepts (AC) - Week/Course Learning Outcomes Using your textbook, LIRN-based research, and the Internet, apply the learning outcomes for the week/course and lecture concepts to one of the following scenarios: As applied to your current professional career As applied to enhancing, improving, or advancing your current professional career As applied to a management, leadership, or any decision-making position As applied to...
What are the UNIX codes for each of these steps Display the directories and sub-directories including...
What are the UNIX codes for each of these steps Display the directories and sub-directories including files so I can verify your starting point. Redirect the above step to the lab3.txt file Make a sub-directory named Files in your user directory
Need to process these steps in UNIX. To encourage users to get a good night's sleep,...
Need to process these steps in UNIX. To encourage users to get a good night's sleep, it has been decided that the web server will be unavailable from 23:30 each night until 07:00 the next morning. Create a cron file named /etc/cron.d/web that stops httpd each evening at 23:30 and restarts it the next morning at 07:00.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT