8
1
I have for example database backups on my Linux server, and I would like to write a script to upload it to remote FTP. I tried the put
command, but it can only transfer one file at a time. Then I tried the mput command, but it just shows me question marks for files I want to transfer (maybe I'm using it wrongly?..)
I tried this:
#!/bin/bash
ftp -n <<EOF
open ftp.server.com
user name password
cd backup
mput /backup/*
EOF
But it won't work. It outputs names of files I want to transfer with question marks at the end of names. Am I missing something or maybe there is better simpler way?
I was about to suggest ncftp too. Use it all the time (and its bookmarks feature is great :)). – a CVn – 2013-10-11T07:31:14.283
For some reason it wronlgy installed or didn't install at all. It gives me error
-bash: ncftp: command not found
. In install log it said it succesffuly installed, but I also saw warnings like these -" insserv: warning: script 'NcFTPd' missing LSB tags and overrides insserv: There is a loop between service redmine and NcFTPd if stopped insserv: loop involving service NcFTPd at depth 2 insserv: loop involving service redmine at depth 1 insserv: Stopping NcFTPd depends on redmine and therefore on system facility `$all' which can not be true!" – Andrius – 2013-10-11T07:38:26.8402@Andrius Are you sure that you installed the client and not the server? The error message definitely suggests you installed the server. – a CVn – 2013-10-11T07:42:44.503
Right.. How I didn't see that :) – Andrius – 2013-10-11T07:48:09.450