Need a script to do daily backups


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need a script to do daily backups
# 8  
Old 01-18-2005
Doh, my apologies about the rules. I'll take a look at this and then post back later one. Thanks! Smilie
# 9  
Old 01-18-2005
You might also note that searching first is a good practice - take a look at this post about a backup script - it will help you understand the rules and scripting a backup script.
# 10  
Old 01-18-2005
Wow, thanks RTM, your quick walkthrough was a massive help for helping me get a quick grasp on how things work. Now, my next question for this:

How do I input multiple commands to execute? (does that make sense?)
In other words, there are specific files and folders that I want to backup. I can't really do one all encompasing backup. I have to be very specific with what files I want. So would I just do something like this:

$ cd
$ vi backup
#!/bin/bash
cp -r -f /directory1/ ../backup/directory1/
cp -r -f /directory2/ ../backup/directory2/
cp -r -f /file.php ../backup/directory3/
cp -r -f /dir3/file2.php ../backup/directory/dir2/
exit
# 11  
Old 01-18-2005
That should work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script no more than twice daily WITHOUT cron

Can I run a script no more than twice a day without using cron? Maybe create a file when script is first run and check its date? (7 Replies)
Discussion started by: drew77
7 Replies

2. UNIX for Beginners Questions & Answers

/etc/cron.daily script is not being executed

Hi All I have created a file in /etc/cron.daily on redhat linux 7.3 version host called applicationscript cat applictaionscript #!/bin/bash /prod/data/routine.sh cat /prod/data/routine.sh #!/bin/bash #details regular=/prod/data/jboss/logs backup=/prod/data/logs #echo "Moving logs"... (3 Replies)
Discussion started by: anil529
3 Replies

3. Shell Programming and Scripting

Help me with daily monitoring script

find /usr/IBM/FileNet/BulkUploaderScript/$i/Log/SuccessLog \( -newer range_start -a \! -newer range_end \) -exec wc -l {} \; |awk '{total+=$1-1} END {print total}' >>$LOGFILE I need to print time stamp of the files int the paticular period .Please modify the above script so that i get... (34 Replies)
Discussion started by: RaghavendraT
34 Replies

4. Shell Programming and Scripting

Script for daily use

I have a clear case command for example. ct lsprivate -co this displays the list of checked out files. and i have many views where i work daily I need a script which can run daily at our specified time. setting each and every view i have and list the check outs i have in them. and consolidate... (10 Replies)
Discussion started by: Syed Imran
10 Replies

5. Shell Programming and Scripting

Daily health check script

Hi I am still learning how to write shell scripts, so I started to write a script like this: #!/bin/sh date echo outputOK () { echo $1 "" } outputOK () { echo $1 "" } for vol in `/usr/bin/grep -E 'hfs|vxfs|nfs|cifs' /etc/fstab | egrep -v '^#' | awk '{ print $3 }'` do if... (7 Replies)
Discussion started by: fretagi
7 Replies

6. Shell Programming and Scripting

Help with Daily DB growth script

Hello, I have a script SELECT TO_CHAR(creation_time, 'RRRR Month') "Month", SUM(bytes)/1024/1024 "Growth in MB" FROM sys.v_$datafile WHERE creation_time > SYSDATE-365 GROUP BY TO_CHAR(creation_time, 'RRRR Month') / It produces output similar to this Month ... (2 Replies)
Discussion started by: jnrpeardba
2 Replies

7. UNIX for Dummies Questions & Answers

Run a .sh script daily

Hi, I juat wondering how can you set it up so that .sh files will execute automatically once a day. from google I've got use crontab but when I type this into my session it say I am not allowed to use this programme. Any other ways to achieve what I'm looking for? thanks (1 Reply)
Discussion started by: blackieconnors
1 Replies

8. Shell Programming and Scripting

Perl script to invoke Cold Backups

Hello, I am relatively new to Perl and I need help in creating a Perl script to automate a crontab job that starts and shutdowns multiple servers one server at a time. Script is to be run once a week. Below are the steps needed for the job... 1. Start stopping server1 and server2 using... (3 Replies)
Discussion started by: northern1969
3 Replies

9. Shell Programming and Scripting

Script to delete logs or take backups under specific user

I have to write a shell script like this-- 1) Utility will be run under the directory owner. 2) This utility will clean files in ABC/logs. And following logs will be backed up or deleted. Dispatcher Logs Middle tier Logs Sage log Sage monitor log Sage db clean up result log Core files ... (12 Replies)
Discussion started by: namishtiwari
12 Replies

10. UNIX for Dummies Questions & Answers

backing up file everytime script run and saving other backups

how would i go about creatng a backup of a file everytime a script is run so that the next time it is run the old backup gets pushed back and the most recent backup is 1st. (new)backup.1 (old)backup.2 that kind of idea?? (4 Replies)
Discussion started by: knc9233
4 Replies
Login or Register to Ask a Question