Ubuntu FTP Server - Hetzner

0

I have an FTP Backup Server in Hetzner with details

Backup Server: u*****.your-backup.de

I am trying to connect to it through my ubuntu server using command

$ ftp u*****.your-backup.de

and i see ftp> then trying to upload my Postgresql Database backup file using command

ftp> put /home/*myhomedir*/Dropbox/backup/rajedb.backup 
local: /home/*myhomedir*/Dropbox/backup/rajedb.backup remote: /home/*myhomedir*/Dropbox/backup/rajedb.backup
200 EPRT command successful
550 /home/*myhomedir*/Dropbox/backup/rajedb.backup: No such file or directory
ftp> put /home/*myhomedir*/Dropbox/backup/
local: /home/*myhomedir*/Dropbox/backup/ remote: /home/*myhomedir*/Dropbox/backup/
/home/*myhomedir*/Dropbox/backup/: not a plain file.
ftp> put /home/*myhomedir*/Dropbox/backup/rajedb
local: /home/*myhomedir*/Dropbox/backup/rajedb remote: /home/saksham/Dropbox/backup/rajedb
local: /home/*myhomedir*/Dropbox/backup/rajedb: No such file or directory

Now my question is: How do i take backup of my files in hetzner server? and how do i download them when ever required?. and I want to take backup of my files for every 30minutes or 1hour.

thanks.

Mani Deep

Posted 2013-11-24T05:43:31.947

Reputation: 103

The command above did not work only because it could not find the file you mentioned, otherwise the command was fine. Just point it to a file which does exist. The reverse of put is get, you can transfer whole directories with mget -i and mput -i. If you want to make backups automatically you ought to learn how to script, using for instance bash. – MariusMatutiae – 2013-11-24T06:31:46.770

@MariusMatutiae: the path is correct.. ive seen it and the same file is synced to dropbox daily.. so its not about path – Mani Deep – 2013-11-24T06:39:46.300

then try the command binary, then try the file transfer again – MariusMatutiae – 2013-11-24T06:41:41.150

ok it worked, any idea/help for me how do i script all this to run for every 1hour,

  1. need to take postgresql db backup
  2. need to zip my app directory
  3. send it to ftp server for every 1hour
  4. < – Mani Deep – 2013-11-24T07:29:29.647

use the command crontab to execute a bash file at fixed time intervals. As for the bash script, it depends on what you you want to back up exactly and how. The ideal command is rsync, look it up to see whether it fits your needs. – MariusMatutiae – 2013-11-24T07:31:26.780

any link/tutorial for scripting? – Mani Deep – 2013-11-24T07:32:21.847

let us continue this discussion in chat

– Mani Deep – 2013-11-24T07:34:26.620

No answers