09-24-2008
Backing up Log file
Hi,
Iam trying to create a back up file for a log file which is being continously updated.
Is there a way to backup without loosing the log, while the back up is also up to date?
If i try to replace the log with an empty file, I loose the log for some seconds.
If I try to create a back up file, the log is immediately updated and my back up is no more current.
In short, I want to retain 6 months data in the log file and it should continue to have all updations as they occur. The rest of the old data I want to push into a new file. Is there a better way to do this.
Thanks for your help.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ok I'm trying to backup a HD using ufsdump but no matter what I do it rewinds the tape after the dump. Now the tape isn't full (only 285mb) and I still have 6 more partitions I want to put on this tape.
How can I stop the tape from rewinding because I can't think of anything.
Also is there any... (4 Replies)
Discussion started by: merlin
4 Replies
2. UNIX for Dummies Questions & Answers
Hi Guys,
I'm writing a shell script that presents the user with various options, they select one (numbered 1-9) and it then excecutes the correct code. No problem, but I'm having slight difficulty with one option.
The user can select to backup all the files in the current directory to another... (2 Replies)
Discussion started by: indigoecho
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm about to start a regular backup schedule for my Linux system.
I need some pointers if I may :)
The system is *mainly* used as a personal home computer (it's actually a laptop running SuSE 9.2) although I do host some client material from it being a PHP developer.
I know that in... (2 Replies)
Discussion started by: d11wtq
2 Replies
4. UNIX for Dummies Questions & Answers
Can you backup the vtoc, then restore it if you somehow mess it up?
This is solaris 9, x86. (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
5. UNIX for Dummies Questions & Answers
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
6. Solaris
Hello Mentors,
Before anything else I would like to thanks to all expert here especially Pressy as he guided me to recover our server from disk failure. I posted a lot of question from these forum site concerning on how to recover our server and luckly you guys help me. Our server is now up and... (6 Replies)
Discussion started by: eykyn17
6 Replies
7. AIX
we are running aix on are server. we would like to start doing online backups, but the software company that we use is not beeing much help on what files we are backing up. is there a command that will tell me what files that we are backing up. they offer a service that would back it up for use,... (3 Replies)
Discussion started by: shane.hankins
3 Replies
8. Shell Programming and Scripting
Hi Everyone,
I am new to DBA stuff. I wonder if anyone can help me. Task is that, I have 10 databases and need to take backups of all the databases using data pump in Unix/Linux, compress them using gzip and use cron to schedule the job twice a day.
Appreciate if anyone can help me in... (1 Reply)
Discussion started by: sreepriya0987
1 Replies
9. UNIX for Advanced & Expert Users
Are there any recommended methods for Backing up an entire HD? I want to backup my data. I do not care about the OS file. I just want my work, movies, and music. I have about 600 GB of work, movies, and music so a bit worried about fragmentation if I just copy and paste. (1 Reply)
Discussion started by: cokedude
1 Replies
log(8) System Manager's Manual log(8)
NAME
log - Records input and output from a program
SYNOPSIS
/usr/sbin/log <logfile> <command>
OPERANDS
The file in which to record the interaction being logged. The command to execute.
DESCRIPTION
The log program runs <command> and logs the input to and output from <command> to the <logfile> file. Input and output are logged until
<command> exits, the log program exits, and the exit status of <command> is returned.
The log program is used by the system installation procedure and the it(8) command to create the /var/adm/smlogs/install.log and
/var/adm/smlogs/it.log installation log files.
RESTRICTIONS
Because the log program is used in the installation standalone environment, program size was the greatest concern in its implementation.
The log program does not search for the PATH variable to locate <command> and error messages are terse.
The log program causes <command> to take standard input from and write standard output and standard error to UNIX pipes. Some commands
will not be able to operate in this environment; therefore, it is suggested that you use the script(1) command instead. UNIX shells will
not issue prompts when run from log unless the shell is started with an explicit interactive switch (-i for most shells). For example, log
foo.tmp /sbin/sh -i
In the previous example, foo.tmp is the name of <logfile>.
The log program intercepts end-of-file (usually Ctrl/d). Therefore programs which normally receive end-of-file as an exit command must
exit by some other means.
ERRORS
Log open error
Explanation:
The log program was unable to open <logfile>. Verify that the directory exists and that ownerships and permissions are set correctly.
Exec Error
Explanation:
The log program was unable to execute <command>. Verify that you specified a full pathname for <command> and that <command> is an exe-
cutable file.
Fork Error
Explanation:
The log program was unable to create one of the processes it requires to log data.
SEE ALSO
Commands: it(8), script(1)
log(8)