LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-14-2009, 06:09 AM   #16
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30

The script can't find the file in /root/backup.....
any ideas?
Code:
#!/bin/bash
/bin/tar cfz /root/backup-`/bin/date +%d%m%Y`.tar.gz  /etc /var/log /var/www /usr/lib/squid/ncsa_auth > /root/my_logfile.log 2>&1

USER="myusername"
PASS="mypassword"
FTPSERVER="ftp.myserver.net"
FILE1="/root/backup-`/bin/date +%d%m%Y`.tar.gz"

ftp -inv $FTPSERVER <<END_SCRIPT
quote USER $USER
quote PASS $PASS
put $FILE1
bye
Code:
Remote system type is UNIX.
Using binary mode to transfer files.
331 Password required for *****
230 User *****logged in
local: /root/backup-14082009.tar.gz remote: /root/backup-14082009.tar.gz
227 Entering Passive Mode (77,232,67,103,225,193).
550 /root/backup-14082009.tar.gz: No such file or directory
221 Goodbye.

Last edited by qwertyjjj; 08-14-2009 at 06:14 AM.
 
Old 08-14-2009, 07:46 AM   #17
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Meh...
I got it to work by changing the directory in the ftp part using
lcd.
Presumably it was looking for a directory called /root on the target ftp site
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File Server + Samba + LDAP + Backup Server pawan_lal Linux - Server 1 05-11-2009 11:10 AM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
backup server ; network file system / ftp-server ? markus1982 Linux - Security 5 06-06-2007 05:15 PM
LXer: Backup MySQL databases, web server files to a FTP server automatically LXer Syndicated Linux News 0 08-11-2006 09:54 PM
Mounting windows server onto SuSE backup server murungu Linux - General 1 09-20-2004 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration