![]() |
Forum Quick command line backup script of HostGator Here's a script I wrote to quickly backup all of my vBulletin information (wwwdir, attachments in filesystem, database) on Hostgator and I thought I'd share it with all of you. I don't mind myphpadmin, but I'm a bit old school and like the SSH command line. Everything in RED is what you need to substitute with your own values. The script assumes you have a "backup" and "attachments" directory in the root of your HG home folder. You can run the script as often as you like because it appends a date and time stamp on the end of each backup file. VBATTACH=/home/yourhgaccount/backup/yourforums_attachements_$(date +%Y-%m-%d_%H_%M_%S).tar.gz VBWWWDIR=/home/yourhgaccount/backup/yourforums_wwwdir_$(date +%Y-%m-%d_%H_%M_%S).tar.gz VBDATABASE=/home/yourhgaccount/backup/yourforums_forums_$(date +%Y-%m-%d_%H_%M_%S).sql.gz tar cvzf $VBATTACH /home/yourhgaccount/attachments/* tar cvzf $VBWWWDIR /home/yourhgaccount/public_html/yourforums.com/* mysqldump --opt -Q -u yourhgaccount_dbuser -p yourhgaccount_yourdbname |gzip -9 > $VBDATABASE Just save the script as something like forumbackup.sh, and run it as follows: "sh forumbackup.sh". You can adapt it for any host provider you want, but I made this on for HG. Regards, ErnestA |
الساعة الآن 03:02 PM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir