scripts to Initialise,backup,restore,delete and empty


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scripts to Initialise,backup,restore,delete and empty
# 1  
Old 10-29-2011
scripts to Initialise,backup,restore,delete and empty

you are to write scripts for a customer that would require a system enable the backing up of files and directories. The script should (these names should be used):

1. INITIALISE: Initialise the directory for the backup(called backup and should be in the home directory) and any other associated files and should be run once before running other scripts.

2. BACKUP: backs up a directory and/or files and/or set of directories(using wildcards) E.g. backup test.java ./cfiles *.c++

3. RESTORE: lists files/directories in backup system and restores selected files and/directories

4. DELETE: Deletes a file/directory from the backup

for example,typing restore without a file/directory name lists the content of the backup:

pxxxxxxx:0:/home/pxxxxxxx/mscow/results
pxxxxxxx:1:/home/pxxxxxxx/mscow/delly
pxxxxxxx:2:/home/pxxxxxxx/mscow/tmp
You can then type restore 1 to restore the file delly. Note that if you back up two files with the same name,they should both be saved and you should be able to restore either or both of them.

5. EMPTY: this will just empty the trash can

NB:
Initialise just sets up any directories,files,etc that the system needs and should be run once before using the other scripts,you may assume that the user has a bin directory which is on their PATH,the script will be used by ex-windows users and should be designed to operate on the users path(eg $HOME/bin)."
# 2  
Old 10-29-2011
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Backup / Restore

Hi, I need to back up a RH file system (96G). The files are oracle .dbf format some of which are 5G in size. I know that tar has got a size restriction of 2G so I cannot use this. Can anyone recommend an alternative way of backuping up this FS? I have been looking at dump but this... (6 Replies)
Discussion started by: Duffs22
6 Replies

2. Solaris

Zpool backup and restore

hi, my requirement goes something like this: In current setup, we have SPARC server running Solaris10 5/08. Out of 3 HDD available, 2 HDD (other than root) were zpool-ed and 3 zones were created. Now, we have bought a new server with similar H/W config and planning to move the zones... (1 Reply)
Discussion started by: EmbedUX
1 Replies

3. AIX

Backup and restore

Hi experts, i got a question. i have a production server with two Volume Group(VG) which are rootvg and datavg. Both of these VGs are 256 PP SIZE. On Disaster Recovery Server (DR server) contains two empty hardisks for restoring rootvg and datavg from production server. This two hardisks are... (7 Replies)
Discussion started by: polar
7 Replies

4. Homework & Coursework Questions

Delete restore and empty trash

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A set of Linux shell scripts is required to allow users to ‘remove' files without them really disappearing... (1 Reply)
Discussion started by: mr100perecent
1 Replies

5. Shell Programming and Scripting

Backup/restore scripts

hi people i am in need of some assistance here hoping to star a linux course in january to wanted to get some experiance before starting so got a hold of some old assessments from a mate at college so just working through them in my spare time for the past 8 weeks or so and this is the final ? that... (2 Replies)
Discussion started by: boabbyrab
2 Replies

6. AIX

HMC backup/restore

Hey Some questions.. 1. can we install hmc fixes/patches from nfs mount? 2. Lets say my hmc crashed are these the steps for recovery? - install the base hmc software (product cd) - install the updates/patches/corrective service - restore the critical console date am... (4 Replies)
Discussion started by: balaji_prk
4 Replies

7. AIX

AIX backup and restore

Hello, Some background so you can see what I'm trying to do on AIX: In Windows its possible to partition a single hard drive into 2 separate logical paritions which may appear as a C and a D drive. It is then possible to to use 3rd party software such as Power Quest Drive Image to create a... (3 Replies)
Discussion started by: quickfirststep
3 Replies

8. HP-UX

F-Backup restore

Hello! i have a blank harddrive and a complete tape backup of the workstation. the backup is made with F-Backup. Now my question is: how can i restore my workstation? thanks for every idea! paul tittel hup-si (3 Replies)
Discussion started by: paultittel
3 Replies

9. AIX

Backup and restore

I have several H80 machines, all with AIX 4.3.3. On these machines I have mksysb running for rootvg backups and savevg for non-rootvg backups. I'm trying to get a list of files on the tapes, but I can't seem to do it with tar for the mksysb images. I keep getting the directory checksum errors?... (3 Replies)
Discussion started by: uXion
3 Replies

10. Solaris

Backup / restore

Hi.... everyone could help me to understand how to do a backup of my servers .. operating systems is sun solaris 8 . I have some question about .... 1) Is better backup phisical disk or partition ??? i sow the command is ufsdump 0cfu /expbck/bcksunver/c0t0d0s5 dev/dsk/c0t0d0s5 to... (4 Replies)
Discussion started by: tt155
4 Replies
Login or Register to Ask a Question