Jump to content
  • 0

Question

11 answers to this question

Recommended Posts

Posted

Hi RaGERO,

You can use this script;

https://asurahosting...ols/bkup_sql.sh

Just modify the values correctly, and make sure the backup directory you are saving it to... actually exists.

To make a folder, you can use VNC or type the following command in the terminal...

mkdir /DESTINATION/NEW_FOLDER

To make the script executable, you can edit the properties in your SFTP client or do the following command in the terminal...

cd /LOCATION/OF/SCRIPT
chmod +x bkup_sql.sh

Then finally, you need to add it to the cronjob; which would be like this...

export EDITOR=/usr/bin/nano
crontab -e

Inside the crontab, you would need to input...

0 3 * * * /LOCATION/OF/SCRIPT/bkup_sql.sh

Then just ctrl + c and save.

  • Upvote 1
Posted

Inside the crontab, you would need to input...

0 3 0 0 0 /LOCATION/OF/SCRIPT/bkup_sql.sh

This gave me an error. Fixed it by using * instead of 0:

0 3 * * * /LOCATION/OF/SCRIPT/bkup_sql.sh

Posted

This gave me an error. Fixed it by using * instead of 0:

0 3 * * * /LOCATION/OF/SCRIPT/bkup_sql.sh

Hi Bahmut,

You're right; my mistake. Thanks for the correction.

@Asura,

This will only save the backups on the specified directory, I want it to be uploaded on a separate ftp server.

Hi RaGERO,

If your backup server allows SSH access, you can install the cron task on there and just add the variable '-h'.

mysqldump -h 123.123.123.123 -u USERNAME -p, --password=PASSWORD DATABASE_NAME > FILE_NAME.sql

Replace the 123.123.123.123 with the correct MySQL Host IP; and all the capital letters with the correct information.

  • Upvote 1
Posted

Automatic backups are best done with software like swordsky has really good software with really good options that allows you to back up really large databases and it works as a windows service.

Posted

Automatic backups are best done with software like swordsky has really good software with really good options that allows you to back up really large databases and it works as a windows service.

Thanks, I like to use windows because many korean game use it with mssql.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...