![]() |
Looking for a script to Dump SQL and web files to server
Hi All
I've been trying to set-up a CRON on my PLESK server to dump the database and httpdocs once a day, keep 5 copies and delete anything older than 5 days old. Anyway I cant seem to get it to work and I was wondering what solutions everyone else use's to do the same thing? I was using a plugin back when I was running vBulletin v3 but would much rather do this via CRON on the server to bypass any issues if the domain is down and so on.. Xray |
Log in to your server as root via SSH.
Create a file called backup.sh in your root directory. (this is where you should be when you log in as root via SSH. If you aren't there type cd /root) Put this code in the backup.sh file.. Code:
#!/bin/sh Create a cron task using crontab -e Put this in the task.. Code:
30 23 * * * /root/backup.sh > /dev/null 2>&1 master_backup_1.tar.gz master_backup_2.tar.gz master_backup_3.tar.gz master_backup_4.tar.gz master_backup_5.tar.gz As time progresses, the oldest file will be overwritten with a new backup. You need to check the file dates for the newest backup. In other words, after master_backup_5.tar.gz takes place, the count starts over and master_backup_1.tar.gz will be replaced by the new backup file. With all that said, it makes absolutely no sense to keep a backup of your site on the same server the site is on. If the server should fail, you won't have any backups at all. Backups should be transferred to some other location for safe keeping. |
Thank you so much for your help! I have been trying to get a backup solution up and running ever since I moved servers and upgraded from vB3 to vB4. I will see if I can set this up latter.
For an off site solution could you recommend anything? Lee |
All times are GMT. The time now is 06:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|