Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    General Discussion    Chit - Chat  ›  cron job
Users Browsing Forum
No Members and 2 Guests

cron job  This thread currently has 488 views. Print
1 Pages 1 Recommend Thread
threewishes
January 29, 2010, 3:35pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 264
Posts Per Day: 0.25
Time Online: 2 days 43 minutes
Can someone tell me what command would be to run a cron job to d/l the forum data daily?
Logged Offline
Private Message Private message
evixion
January 30, 2010, 12:33pm Report to Moderator Report to Moderator

Web Developer for Hire
Forum Moderation
Posts: 226
Gender: Male
Posts Per Day: 0.19
Reputation: 100.00%
Reputation Score: +6 / -0
Time Online: 7 days 1 hours 34 minutes
Location: Elizabethton, Tennessee
Age: 26
I had to write a script that would tar up the cgi-bin and blahdocs. Then I put that script into the cronjob. I was thinking about writing an autobackup script for E-Blah but I'm still a novice

If it helps, I can send you my bash script and maybe it can assist you.


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 1 - 3
threewishes
January 30, 2010, 2:44pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 264
Posts Per Day: 0.25
Time Online: 2 days 43 minutes
autobackup script for E-Blah  is what Im looking for

If someone can help us out
Logged Offline
Private Message Private message Reply: 2 - 3
evixion
February 6, 2010, 5:25pm Report to Moderator Report to Moderator

Web Developer for Hire
Forum Moderation
Posts: 226
Gender: Male
Posts Per Day: 0.19
Reputation: 100.00%
Reputation Score: +6 / -0
Time Online: 7 days 1 hours 34 minutes
Location: Elizabethton, Tennessee
Age: 26
Ok, bear with me but this is what I have as an auto-backup script

Save this file in your shell account as whatever_your_domain_is_backup.sh

You will also need to edit the first few lines to point to the correct directory (and you may need to make the backupdir directory). Also I made my script e-mail me every time a backup is performed so you will need to edit the [email protected] to point to your e-mail address.

Code
#!/bin/bash

sourcedir=/full/path/to/your/forums/cgi-bin
backupdir=~/eblahforumbackup/
haltfile=~/eblahforumbackup/.halt
datedir=`date +%Y/%m-%B/`

if [ ! -f $haltfile ] ; then
        touch $haltfile

        cd $sourcedir

        if [ ! -d ${backupdir}${datedir} ] ; then
                mkdir -p ${backupdir}${datedir}
        fi


        tar -cjf "${backupdir}${datedir}forums-`date +%m-%d-%y.%H-%M-%S`.tar.bz2" .


        echo "A daily backup was made of the Your Forum database ${sourcedir}. The file can be found at: ${backupdir}${datedir}gaforums-`date +%m-%d-%y.%H-%M-%S`.tar.bz2" | mail -s "Daily Backup Report" youremail@domain.com


        find $backupdir -type f -mtime +30 -exec rm {} \;
        find $backupdir -type d -print0 | xargs -0 rmdir --ignore-fail-on-non-empty --parents

        rm -f $haltfile


fi



This code will tar your forum folder if configured correctly. It will also delete any backup that is older than 30 days.

Let me know if I can be of further assistance


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 3 - 3
1 Pages 1 Recommend Thread
Print

E-Blah Community    General Discussion    Chit - Chat  ›  cron job