Backup SQL only and transfer it via FTP

duzap

Verified User
Joined
Nov 14, 2008
Messages
41
How can I do that? I don't want to make full backup, only databases.
In if its possible so only a specific database. (and I must that it will be transfered via FTP to another server)
 
You can make a script to do it in bash or sh.

backup with the mysqldump command.
 
I don't know to create scripts, do you have something similar that will work for this?
 
You don't read my first post, I need to backup the SQL and transfer it via FTP automatically (every day)
 
So then use the backup as mentioned, and then log in and transfer it via ftp.

Writing a script for you is probably beyond the scope of the forum.

Jeff
 
well I found a script that fit my needs
but I don't success to run it
this is the script http://www.ameir.net/files/backupmysql-2.sh

I did: chmod a+x /home/user/backupmysql-2.sh
/home/user/backupmysql-2.sh

And then I received: /home/user/backupmysql-2.sh: not found

Where I was wrong? how can I run this script without any errors?
I am using freebsd 7.1
 
Your path to bash might be different.

Make sure the file is really at that location;

Type:

bash /home/user/backupmysql-2.sh

See what happens.

You might have to change the top of the file from #!/bin/bash to #!/usr/local/bin/bash

Chmod the file to 755 or 750 and you should be fine.
 
scsi, thank you!!
bash wasn't even installed.
Now everything is working perfect :)
backup sql, gzip it, transfer it to another server via FTP + removing the old backups! :)
 
I am having a problem again :(
when I am running the script manually from SSH --> /home/USER/mysqlbackup.sh

Everything is working fine and the size of the backup is 160MB (gzipped).

But now I've added this script to a cronjob in the DA panel and it doesn't giving me a full backup, it looks like its stopping the mysqldump command in the middle, the backup is only about 70MB (gzipped) ...
due to these facts I am sure the problem is in the cronjobs but I dont know how to fix that, help me please.
 
sorry but I have to bump it, I am still having this annoying problem!
 
Back
Top