Question

The course is server management and I am using FREEBSD Create a folder off the root...

The course is server management and I am using FREEBSD

  1. Create a folder off the root that can be used for the backed-up files. You will need to use root to create this directory. Set the user and group for this directory to the account that you normally log in to.
  2. Create a cron process that will run every thirty minutes and copy the complete contents, including directories and their contents, to the backup location.
  3. The copy command should use the verbose option, and direct its output to a log file stored in the backup directory.

I have already done parts 1 and 2

I created a directory called Backedupfiles

The user I have is 'admin1'

/usr/home/admin1

I tried 'crontab -e' and it was really confusing, wouldnt let me type some things and I couldnt figure out how to exit it.

I just need help with Question 3

Homework Answers

Answer #1

I do not have FreeBSD to use, but I have done a similar thing on my Lubuntu machine, and to be honest, cron works almost the same on all Linux machines.

You also need to create a log file to direct the output of copy commands to it as per the requirement. You can name it anything you want(I kept it as cronLogFIle)
When you are doing crontab -e, the only possible reason why you are not able to type in some things could be that your default editor is not the one you generally use.

For example, when I did crontab -e, it shows 4 editors, and lets me choose one of them, I chose vim.basic because that's what I prefer to edit any file with.

If you wish to change the default-editor, run select-editor command and pick one for yourself. Then do crontab -e and just add one line and save the file. You are done.

This is what you need to append in your crontab file:

*/30 * * * * cp -rv /usr/home/admin1/ Backedupfiles/ >> cronLogFile

This is how your crontab -e will look like:

/30 is for running the script every 30 minutes
-r flag is for recursively copying everything into the Backedupfiles folder.
-v flag is for doing it verbose.
>> command appends the logs to the cronLogFile

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
“Create a new Java Project” Project name = Lab3 “Use project folder as root for sources...
“Create a new Java Project” Project name = Lab3 “Use project folder as root for sources and class files” Finish Set your classpath for the workspace: Project > Properties > Java Build Path Libraries Add External Jars # if on Windows Choose algs4.jar and stdlib.jar from your user directory Documents/alg4 # else Choose algs4.jar and stdlib.jar from ~/alg4 (I hope you’re getting familiar with this sequence. From now on, I’ll just say “create new project LabX”, and you’ll need to...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
Chapter 8: Searching, Extracting, and Archiving Data Exercise 8.a: Using grep, find, and regular expressions (Objective...
Chapter 8: Searching, Extracting, and Archiving Data Exercise 8.a: Using grep, find, and regular expressions (Objective 3.2) Linux Distribution: Fedora (non-root user & password needed) Desktop Environment: GNOME 3 1.   If you have not already done so, boot up your computer (or virtual machine) to start the Fedora Linux distribution. 2.   When the machine has booted up, access the tty2 virtual terminal by pressing Ctrl+Alt+F2. 3.   Log on to a regular user’s account by typing in the username at the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT