Refine your search:

My coldtofrozenscript on linux is totaly ignored, I tweaked the indexes.conf (a few warmbuckets and small total index) and the data is nicely deleted from cold....

How can I see why the coldtofrozen script isnt working?

Configed exactly like the manual,,,

[<index>]
coldToFrozenScript = /opt/splunk/bin/compressedExport.sh

in

compressedExport.sh I only set the path to the archivelocation

asked 27 Nov '10, 06:18

Starlette's gravatar image

Starlette
4632327
accept rate: 9%

edited 27 Dec '10, 11:59

ziegfried's gravatar image

ziegfried ♦
10.1k1618


2 Answers:

What are the contents of compressedExport.sh? Can you verify that it is executable? Also, try running that script by hand under the same user as splunk:

touch /tmp/foo
/opt/splunk/bin/compressedExport.sh /tmp/foo
link

answered 28 Nov '10, 01:23

tedder's gravatar image

tedder
269119
accept rate: 25%

#!/bin/sh
# Copyright (C) 2005-2010 Splunk Inc.  All Rights Reserved. Version 4.0
# Edit this script to reflect your archive directory and save as
# compressedExport.sh

( cd "$1" && gzip *.tsidx )

cp -r "$1" /opt/fl_virtual_san 

you mean a test dir instead of a file right? I'have made dir /opt/foo for testing and ran:

/opt$ /opt/splunk/bin/compressedExport.sh /opt/foo

#!/bin/sh
# Copyright (C) 2005-2010 Splunk Inc.  All Rights Reserved. Version 4.0
# Edit this script to reflect your archive directory and save as
# compressedExport.sh

( cd "$1" && gzip *.tsidx )

cp -r "$1" /opt/fl_virtual_san 

*** /opt/foo: directory ***

No files anywhere?

link

answered 29 Nov '10, 06:51

Starlette's gravatar image

Starlette
4632327
accept rate: 9%

edited 29 Nov '10, 07:01

I think your problem is that you cd into the directory, then you try to copy the directory from the wrong location. Change it to this: gzip $1/*tsidx cp -r $1 /opt/fl_virtual_san/

(29 Nov '10, 11:08) tedder

Shouldn't be, since the ( ... ) indicates the cd happens in a subshell, so the next command doesn't go to the directory. Furthermore, the path should be absolute for the cp command, so it shouldn't matter. The error indicates that it cp won't copy because /opt/foo is a directory. -r should deal with that. That error message does look strange, and I'm not sure which command is generating it.

(29 Nov '10, 20:30) gkanapathy ♦
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14

Asked: 27 Nov '10, 06:18

Seen: 918 times

Last updated: 04 Apr '11, 18:22

Copyright © 2005-2012 Splunk Inc. All rights reserved.