HOW TO: Automated database backups (1 line of code + cPanel)
#41
How long it takes, usually for database dump 250MB (compressed) or 1.1GB SQL? Smile
Is forum still running during backup? What happen in database (like table lock/wait) during that time?
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
#42
Forum will still run, time depends on your server specs.
I'm not here often, shoot a PM or whatever if you want my discord.
Reply
#43
(2008-02-23, 03:15 AM)KuJoe Wrote: EACH DAY @ 1:15AM YOUR BACKUP WILL BE OVERWRITTEN!
Is possible to make it to not overwrite the old one?
Like in the title of the backup it will set the date and it wont overwrite the other ones.
Is that possible?
[Image: 468x602b.png]
Reply
#44
Yes. At the top of your script put:
NOW="$(date +"%m%d%Y")"

And for your backup name:
/MY/BACKUP/LOCATION/BACKUPNAME_$NOW.sql.gz
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply
#45
Like this?
NOW="$(date +"%m%d%Y")"
/usr/bin/mysqldump -hDBHOST -uDBLOGIN -pDBPASSWORD DATABASE | gzip > /MY/BACKUP/LOCATION/BACKUPNAME_$NOW.sql.gz
uuencode /MY/BACKUP/LOCATION/BACKUPNAME_$NOW.sql.gz BACKUPNAME_$NOW.sql.gz | mail [email protected]

Mhmm do I have to change the DBHOST with my database host keeping the CAPS?


KuJoe Wrote:DATABASE = The database you wish to backup.
This is the database name?
[Image: 468x602b.png]
Reply
#46
Yes that looks correct.

Your DB host should be localhost unless your provider tells you otherwise and it's best to avoid caps unless it is specifically written in caps. I used caps so it stood out better for those reading it.

Yes, the database name.
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply
#47
Thanks Joe, It works like a charm here Smile
vBulletin/Wordpress/Magento/MyBB
Developer and Designer
Reply
#48
(2010-01-06, 02:48 PM)KuJoe Wrote: Yes that looks correct.

Your DB host should be localhost unless your provider tells you otherwise and it's best to avoid caps unless it is specifically written in caps. I used caps so it stood out better for those reading it.

Yes, the database name.
Thank you.
I have created the "backup" folder above the public_html and I can't CHMOD it to 666. It changes to 766... What CHMOD I have to insert for the backup folder?
[Image: 468x602b.png]
Reply
#49
Any CHMOD above 666, so 766 will work.
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply
#50
(2010-01-06, 03:52 PM)KuJoe Wrote: Any CHMOD above 666, so 766 will work.

Thank you.
Is this ok?
   
The "php -f /home/a3230294/" part was already there and I can't delete it..


KuJoe Wrote:Upload the file to your site below the public directory and remove the extention (.txt). Change the permission of the file to allow it to be executed. CHMOD 755 works.
CHMOD 755 will allow user form outside to read the file...
CHMOD 733 works?
[Image: 468x602b.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)