LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-06-2012, 03:05 AM   #1
ChristianLJ
LQ Newbie
 
Registered: Jul 2012
Posts: 19

Rep: Reputation: 0
VPS backup to remote FTP


Hello,

I am trying to make a backup script for my CentOS VPS. It should make the backup to a local FTP server.

I have the following script which works as intended:

Quote:
#!/bin/sh
HOST="11.11.11.11"
USER="admin"
PASSWORD="xxxxx"
TODAY=$(date +%Y-%d-%m_%H:%M)
ftp -nv <<EOF
open $HOST
user $USER $PASSWORD
mkdir /xxx_BACKUP/$TODAY
cd /xxx_BACKUP/$TODAY
EOF
echo -e "FTP backup done!"
I need the part where i copy a file from my VPS, let it be /srv/blabla/file.txt and put it on my FTP server in the directory /xxx_BACKUP/$TODAY

I have tried with put, get and mput. Nothing seems to work.

What am i missing?
 
Old 08-07-2012, 12:09 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
not a direct answer to your query but you might be able to simplify the script by installing fuse curlftpfs, mounting the ftp server(s) as local volumes and performing a standard copy operation.
 
  


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
how can backup a remote server(only folder needed) with ftp ,daily backup? ahjafari Linux - Newbie 1 10-26-2011 04:04 PM
how can I keep connection open with remote vps? rblampain Linux - Networking 2 08-24-2011 11:48 AM
VPS Backup Talon21 Linux - Server 2 02-18-2009 08:51 AM
remote desktop on a VPS ? def.ho Linux - Server 0 06-03-2008 03:42 AM
Backup options of a remote ftp account? jme Linux - Newbie 5 12-17-2005 07:40 AM

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

All times are GMT -5. The time now is 04:01 AM.

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