Sponsored Content
Top Forums Shell Programming and Scripting A script doesnt work properly when crontab Post 302305871 by digitalrg on Friday 10th of April 2009 02:38:06 AM
Old 04-10-2009
A script doesnt work properly when crontab

Hi,

I have a script which does a tar and sends it to another server as backup.
Script is as below

# Locations to be backed up. Seperate by space
BACKUP_LOCATIONS=/repos/subversion

BACKUP_BASE_FOLDER=/bakpool
BACKUP_FILE_NAME_ROOT=svn-backup

START_TIME_DISP=`date`
START_TIME=`date +%Y%m%d%H%M%S`
BACKUP_FILE=${BACKUP_BASE_FOLDER}/${BACKUP_FILE_NAME_ROOT}-${START_TIME}.tar

# Run the backup
/usr/bin/tar -cvf ${BACKUP_FILE} ${BACKUP_LOCATIONS}
#scp ${BACKUP_FILE} m1008366@57.5.198.208:/backup/svn/fops << PPASS
/usr/bin/scp ${BACKUP_FILE} m1008366@57.6.198.206:/backup/svn/fops << PPASS
intel2707
PPASS


When i run this scrip manually it gives back up of size 2862295040 however if i crontab it it just results in the size 38881280. my crontab settings are
1 11 * * 1-6 . /scripts/backup-script.sh
Please help....
Regards..
RG
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

why doesnt my script work!!!

Is there a utility or command I can use to tell the number of decimal places a number has. For instance, if the number is 432, it will give hundred as the number of decimal places. (7 Replies)
Discussion started by: Heedunk
7 Replies

2. UNIX for Dummies Questions & Answers

cd.. doesnt work

hi when i want to go to previous directory by typing cd.. i get the following message $ cd.. ksh: cd..: not found Please help rintingtong (2 Replies)
Discussion started by: rintingtong
2 Replies

3. Solaris

SSH doesnt exit properly from command line

I ssh to another server and run a few commands - start a few processes that run on the server. I then type exit - by my command line hangs. I have heard that it is waiting until anything processes you are running complete, but these processes are going to run 24*7*365 so obviously I cant wait.... (4 Replies)
Discussion started by: frustrated1
4 Replies

4. UNIX for Dummies Questions & Answers

cp doesnt work - Help

When trying to copy a file in Solaris 8 it doesnt copy file or give a error. This worked 100% until the 29th. I've checked the rights and everything seems fine: drwxrwxrwx 2 bmuser bmgroup 11776 Jan 3 10:32 spool This is the file I want to copy: -rwxrwxrwx 1 bmuser bmgroup ... (26 Replies)
Discussion started by: rudi.okelly
26 Replies

5. AIX

Crontab file doesnt seem to work

Hi all. Could anyone explain me why this simple cron job doesnt work: % whoami system % crontab -l * * * * * /usr/bin/touch /home/system/foo (3 Replies)
Discussion started by: bsddaemon
3 Replies

6. Shell Programming and Scripting

Script not running properly when run from Crontab

Hi I am a novice Linux/Perl user and am struggling to overcome what I am sure is a simple problem. I am using a perl program to create a shell script daily containing between 10 and 30 "at -f" commands for the same day. Then I change the file attributes to allow the file to be executed. When... (2 Replies)
Discussion started by: simoncjones
2 Replies

7. AIX

Vi doesnt work

Hi Guys, I have a strange problem.( AIX 6.1) "vi" is not working at all..Whenever i #vi <anythin> ,, it returns the prompt back. Any clues folks?? (14 Replies)
Discussion started by: muzahed
14 Replies

8. UNIX for Dummies Questions & Answers

why doesnt it work?

I am trying to print out two fields in a file using awk. So, I have got awk -F '\t' 'NF = 2 {print $1 $2 "]"}' two.txt in a script called what.awk When i run this version like this - ./what.awk then it runs however I want to run the program like this awk -f what.awk two.txt. When I... (8 Replies)
Discussion started by: The undertaker
8 Replies

9. UNIX for Dummies Questions & Answers

[SOLVED] Mv command doesnt work in shell script

Hi All, i created the below script to move file with xml extension from one directory to another,but the mv command is not working inside the shell script, #!/us/bin/ksh filepath="/apps/extract" filename="*.xml" foldername=2191POB000_$(date +%Y%m%d%H%M%S) mkdir -p "$filepath/$foldername"... (3 Replies)
Discussion started by: Radhas
3 Replies

10. Shell Programming and Scripting

Having trouble getting my interactive perl script to work properly

So I'm making an interactive perl script, but I can't get it to work properly. I'm trying to make a script that tell the user to input either 'q' or 'Q' to terminate the program, or 'c' to continue it. If they input anything other than those three keys, it should prompt the user again and again... (5 Replies)
Discussion started by: Eric1
5 Replies
BACKUP.D(5)							backupninja package						       BACKUP.D(5)

NAME
BACKUP.D - Action configuration files for backupninja(1). SYNOPSIS
/etc/backup.d/* DESCRIPTION
To preform the actual backup actions, backupninja processes each action configuration file in /etc/backup.d according to the file's suffix. .sh run this file as a shell script. .rdiff backup action for rdiff-backup. .dup backup action for duplicity. .maildir backup action for slow, incremental rsyncs of tens of thousands of maildirs. .mysql backup action for safe MySQL dumps. .pgsql backup action for safe PostgreSQL dumps. .sys backup action for general system reports and hardware information. .svn backup action for safe backups of subversion repositories. .trac backup action for safe backups of trac repositories. .makecd backup action for burning backups to CD/DVD or creating ISOs. These files must be owned by root and must not be world or group readable/writable. Support for additional configuration types can be added by dropping bash scripts with the name of the suffix into /usr/share/backupninja. The configuration files are processed in alphabetical order. However, it is suggested that you name the config files in "sysvinit style." For example: 10-local.pgsql.disabled 15-runthisfirst.sh 20-runthisnext.mysql 90-runthislast.rdiff Typically, you will put a '.rdiff' config file last, so that any database dumps you make are included in the filesystem backup. Action con- figurations which end with .disabled are skipped. Example templates for the action configuration files can be found in /usr/share/doc/backupninja/examples. You can also use ninjahelper(1), a console based "wizard" for creating backup actions. SCHEDULING
By default, each configuration file is processed everyday at 01:00 (1 AM). This can be changed by specifying the 'when' option in a backup action's config file or in the global configuration file. Special value 'manual' will disable scheduling for the backup action. It is pos- sible to run the backup action manually by invoking ninjahelper(1) with --run command line argument. For example: when = sundays at 02:00 when = 30th at 22 when = 30 at 22:00 when = everyday at 01 when = Tuesday at 05:00 when = hourly when = manual These values for "when" are invalid: when = tuesday at 2am when = tuesday at 2 when = tues at 02 A configuration file will be processed at the time(s) specified by the "when" option. If multiple "when" options are present, then they all apply. If two configurations files are scheduled to run in the same hour, then we fall back on the alphabetical ordering specified above. The "when" must occur before any sections in the action configuration file. FILE FORMAT
The file format of the action configuration files is "ini style." Sections are created by using square bracket. Long lines are connected with a backslash. For example: # this is a comment [fishes] fish = red fish = blue [fruit] apple = yes pear = no thanks i will not have a pear. SEE ALSO
backupninja(1), ninjahelper(1), backupninja.conf(5), AUTHOR
BACKUPNINJA was written by the riseup.net collective. riseup October 10, 2005 BACKUP.D(5)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy