Percona SQL Backup Shell Script not working


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Percona SQL Backup Shell Script not working
# 1  
Old 02-24-2015
Percona SQL Backup Shell Script not working

I am having one heck of a time, and I need anyone that can assist in finding my issue here....

First off, here is the script we are using:

pastebin dot com slash njwUg6vd

All usernames and passwords have been edited out. We are using an actual database user, and not root (tried both).

I am however getting this error no matter what I try, once the cron job runs (which right now while I am testing is set for every 2 minutes

Code:
tail: option requires an argument -- 'n'
Try `tail --help' for more information.

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

150224 10:30:01  innobackupex: Starting mysql with options:  --user='*************' --unbuffered --
150224 10:30:01  innobackupex: Connected to database with mysql child process (pid=7010)
innobackupex: Error: mysql child process has died: ERROR 1045 (28000): Access denied for user '********'@'localhost' (using password: YES) Send options without primary recipient specified.
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users

I set the cronjob up in cPanel to run the following command:

/home/******/backup/sql/percona-xtrabackup.sh

Which will work, if I run the same exact command in SSH as root. I have tried all sorts of variables, and having one heck of a time. Can anyone please help point out the issue I am missing here?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help required to get a backup script working

Hi all I have a unix based firewall, which creates a daily backup file on the device. I need a script to scp this file over to a remote server. I can get this working daily using a basic script and a cron job. However, I only want it to send the latest config back up file and currently... (4 Replies)
Discussion started by: jimmyzoom
4 Replies

2. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies

3. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

4. Shell Programming and Scripting

Help with Backup Shell Script

i need to print the first date of the previous month in 20130101 format. i use the below script month_year=$(date +'%m%Y' | awk '!--$1{$1=12;$2--}') m=${month_year% *} y=$month_year##* } d=$(cal $m $y | paste -s - | awk '{print $NF}') firstdate=${printf '02d01%s' $y $m) echo $firstdate ... (1 Reply)
Discussion started by: vino1989
1 Replies

5. Shell Programming and Scripting

Script (with sql queries) not working using cron

Hi all, I have script, which performing sql queries and put output into file. When I run this script manually, its working fine, but when I want to schedule it with cron I am getting errors... I defined LD_LYBRARY_PATH and ,but no result. After I defined it, I am getting error: # more... (4 Replies)
Discussion started by: nypreH
4 Replies

6. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

7. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

8. Shell Programming and Scripting

Backup script not working

Hi guys iv been working on a bit of script to do a backup and restore Im going to uni next year and trying to prepare myself Basically all im wanting is a simple script that shows a menu and does what ever the user inputs here is my code #!/bin/sh # Backup des backup= "/root/Russell/"... (2 Replies)
Discussion started by: rustyhamster
2 Replies

9. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

10. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
Login or Register to Ask a Question