Severity: Warning
Message: Undefined variable $page
Filename: front/Articles.php
Line Number: 91
Backtrace:
File: /opt/bitnami/projects/celticproductions.net/application/controllers/front/Articles.php
Line: 91
Function: _error_handler
File: /opt/bitnami/projects/celticproductions.net/index.php
Line: 315
Function: require_once
Severity: Warning
Message: Undefined variable $pages
Filename: front/Articles.php
Line Number: 110
Backtrace:
File: /opt/bitnami/projects/celticproductions.net/application/controllers/front/Articles.php
Line: 110
Function: _error_handler
File: /opt/bitnami/projects/celticproductions.net/index.php
Line: 315
Function: require_once
Severity: Warning
Message: Undefined variable $page
Filename: front/Articles.php
Line Number: 111
Backtrace:
File: /opt/bitnami/projects/celticproductions.net/application/controllers/front/Articles.php
Line: 111
Function: _error_handler
File: /opt/bitnami/projects/celticproductions.net/index.php
Line: 315
Function: require_once
Severity: Warning
Message: Undefined variable $category
Filename: front/Articles.php
Line Number: 113
Backtrace:
File: /opt/bitnami/projects/celticproductions.net/application/controllers/front/Articles.php
Line: 113
Function: _error_handler
File: /opt/bitnami/projects/celticproductions.net/index.php
Line: 315
Function: require_once
Severity: Warning
Message: Undefined variable $articles
Filename: front/Articles.php
Line Number: 114
Backtrace:
File: /opt/bitnami/projects/celticproductions.net/application/controllers/front/Articles.php
Line: 114
Function: _error_handler
File: /opt/bitnami/projects/celticproductions.net/index.php
Line: 315
Function: require_once
# We are going to keep 3 backups on our remote server
# so we need to maintain a counter on the local side
# to tell us what the backup index is.
# Adjust these numbers to keep more or less backups.
# For example, to keep backups of the last 5 days
# change "$thisbackup -eq 3" to "$thisbackup -eq 5"
lastbackup=$(cat counter.txt)
thisbackup=`expr $lastbackup + 1`
if [ $thisbackup -eq 3 ]
then
echo 0 > counter.txt
else
echo $thisbackup > counter.txt
fi
echo "Backup Index Is $thisbackup"
# Todays date
mydate=$(date +%s)
# Database username and password
DBUSER=my_db_user
DBPASS=my_db_password
# Name of the tar file we are going to create
FILE=master_backup_$thisbackup.tar
# Name of the database dump file we are going to create
DBFILE=db_backup.sql
# Dump the contents of all databases to the database dump file
mysqldump --opt -u $DBUSER -p$DBPASS --all-databases > $DBFILE
# Create the tar file adding in the contents of 'public_html'
# and the previously database dump file
# Unless you want a huge list of files, redirect
# output to /dev/null
tar -cf $FILE $DBFILE public_html > /dev/null
# Remote host details, IP, USER AND PASSWD
# Excuse the irony of the remote host example
# value being the most local host possible!
HOST='127.0.0.1'
USER='my_remote_user'
PASSWD='my_remote_password'
# Execute the FTP PUT (STOR) command ensuring
# the user has permission to write to my_home_folder
ncftpput -u $USER -p $PASSWD $HOST /home/my_home_folder $FILE
# Delete the files we used so we don't end up backing
# up the backups if the script is inside the folder we're
# backup up... ;-)
rm $FILE
rm $DBFILE
mysqldump
mysql command.
tar
tar literally stands for 'tape archive'.
ncftpput
ncftpput command doesn't exist on your server. That is indeed a problem. The command is by no means standard and in my experience, there is probably about a 30% chance of it already being installed on your server. The command is part of a larger library called ncftp which for your convenience we have provided 2 downloads: The first download is an RPM file for Red Hat Linux servers. Upload the rpm file to your server and issue rpm -Uvvh ncftp-3.0.3-6.src.rpm. Once that has finished, you'll need to compile the source code into a binary. cd to the redhat sources directory, run ./configure and make and you should be laughing. If that all sounds like far too much, just download the ncftp binaries, i.e. the second download. One of the binaries included in this library is the one of interest in the above article, i.e. the ncftpput binary.