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...
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?
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.
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.
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.
What is the definition of the FTP server? What are the steps to receive the files...
What is the definition of the FTP server? What are the steps to receive the files from the FTP server? Explain and justify jour answer by drawing
In Java and using JavaFX, write a client/server application with two parts, a server and a...
In Java and using JavaFX, write a client/server application with two parts, a server and a client. Have the client send the server a request to compute whether a number that the user provided is prime. The server responds with yes or no, then the client displays the answer.
please write in c using linux or unix Write a program that will simulate non -...
please write in c using linux or unix Write a program that will simulate non - preemptive process scheduling algorithm: First Come – First Serve Your program should input the information necessary for the calculation of average turnaround time including: Time required for a job execution; Arrival time; The output of the program should include: starting and terminating time for each job, turnaround time for each job, average turnaround time. Step 1: generate the input data (totally 10 jobs) and...
Please write in C using linux or unix. Write a program that will simulate non -...
Please write in C using linux or unix. Write a program that will simulate non - preemptive process scheduling algorithm: First Come – First Serve Your program should input the information necessary for the calculation of average turnaround time including: Time required for a job execution; Arrival time; The output of the program should include: starting and terminating time for each job, turnaround time for each job, average turnaround time. Step 1: generate the input data (totally 10 jobs) and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT