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?