HOW TO: Automated database backups (1 line of code + cPanel)
#61
I don't mind being notified about things that aren't problems, but I want there to be some information not just "your scheduled task has been run." If it's giving me a copy of the database (which I have one of my jobs set to do), the email is fine...but "it worked" would get annoying to see on a routine basis.

Oh, on the line that tells it to email you the database, is there a way to specify a subject? I'm using gmail and it'd be nice to be able to have it take all of the backups and put them together (via a label) and then archive them so I never get bothered with notifications about unread messages just to have the backup sitting there.
Reply
#62
any chance this could be used so the backup name could contain a date variable?

aka so it could allow multiple daily backups


like one of my friends had used

[name removed]-07-03-10.sql.gz for example
Alive because Jesus Died for me, I proudly declare I am a Follower of Jesus Christ, Jesus changed my life, Jesus wants to change your life for the better too.
Reply
#63
(2010-03-19, 10:31 AM)Redeemed_warrior Wrote: any chance this could be used so the backup name could contain a date variable?
(2010-01-06, 03:45 AM)KuJoe Wrote: 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

Like that?
Reply
#64
(2010-03-19, 10:34 AM)ladyunicornejg Wrote:
(2010-03-19, 10:31 AM)Redeemed_warrior Wrote: any chance this could be used so the backup name could contain a date variable?
(2010-01-06, 03:45 AM)KuJoe Wrote: 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

Like that?
Thank you! I somehow missed that post
Alive because Jesus Died for me, I proudly declare I am a Follower of Jesus Christ, Jesus changed my life, Jesus wants to change your life for the better too.
Reply
#65
What type of file do I save this as?
Reply
#66
just as "file" no file extension I believe.
Reply
#67
(2010-04-05, 08:47 PM)tommykent1210 Wrote: What type of file do I save this as?
(2010-04-05, 08:55 PM)Prentice Wrote: just as "file" no file extension I believe.

Yep, remove the extensions entirely. Smile
Reply
#68
I do this straight from the ACP. Am I missing something or is it the same thing?
Reply
#69
Can you make the backupdb.php file run and backup the ENTIRE database not just the mybb tables?
Reply
#70
(2010-04-06, 12:31 AM)RPicard Wrote: I do this straight from the ACP. Am I missing something or is it the same thing?
Nope. Please read the first post in this thread.

(2010-04-06, 08:17 AM)tommykent1210 Wrote: Can you make the backupdb.php file run and backup the ENTIRE database not just the mybb tables?
Yes you can.
-Joe
AFreeCloud - Free Cloud-Based Web Hosting!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)