Setup database backup cron job on godaddy hosting account

Setup database backup cron job on godaddy hosting account

Many time you need to setup Cron Job to schedule specific task at regular interval. This article covering cron job setup on godaddy account. Godaddy account has different interface then traditional cpanel. These instructions apply to WordPress.com server installations. Here are the steps to take daily backup of DBS. Here are the steps to setup cron job for daily backup of database.
  • Log Into your GoDaddy.com account.
  • Choose "My Hosting Account" from the "Hosting & Servers" menu on the top navigation bar.setup database backup cronjob on godaddy hosting account
  • In the Hosting Account list, click the Open link beside the account you want to use for your website.Godaddy Hosting Account Setup
  • In the Hosting Manager window, click the Cron Manager icon or "Cron Manager" menu item under content menu. Please refer snapshot below.Godaddy Cron Manager Setup Instruction
  • Now you are on the page where you need to setup cron job. Before this, you need to collect following information with the database..Host Name: (Usually localhost but in case of godaddy account it will be look like mysql139.secureserver.net) Database Name: Name of the backup database. User Name: User name of associative database. In case of godaddy account it will be same as db name. DB Password: Database user password for authentication.
  • Please use following mysqldump command to get backup of desired database. Please change required parameter with your own.Syntax: mysqldump --opt -Q -h (hostname) -u (user-name) --password=(password) (database-name) > (full path of backup file)Example: mysqldump --opt -Q -h p3smysql5.secureserver.net -u mywebdb --password=password mywebdb > /home/content/b/a/b/babychep/html/backups/daily.sql Please replace variable with new one and put entire command in command text box. No need to use browse button here. Select how you want to run these command hourly,daily,weekly and click on save button to save cron job. Godaddy Cron Setup Command

Remote Server Backup With rsync

rsync is remote file copy program under Linux. It synchronize file trees across local disks, directories or across a network. It has several advantage over bulky backup software that consume lot of system resources and slow down your pc. rsync uses the remote-update protocol to speed up file transfers when the destination file already exists. The rsync remote-update protocol allows you to transfer differences between two sets of files using an efficient checksum-search algorithm. rsync Features:
  • support for copying links, devices, owners, groups and permissions
  • exclude and exclude-from options similar to GNU tar
  • a CVS exclude mode for ignoring the same files that CVS would ignore
  • can use any transparent remote shell, including rsh or ssh
  • does not require root privileges
  • pipelining of file transfers to minimize latency costs
  • support for anonymous or authenticated rsync servers (ideal for mirroring)
Usage: You need to specify a source and a destination in which one may be remote. rsync *.php foo:src/ this would transfer all files matching the pattern *.php from the current directory to the directory src on the machine foo. If any of the files already exist on the remote system then the sync remote-update protocol is used to update the file by sending only the differences. rsync -avz foo:src/bar /data/tmp this would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships etc are preserved in the transfer. rsync -avz foo:src/bar/ /data/tmp a trailing slash on the source changes this behavior to transfer all files from the directory src/bar on the machine foo into the /data/tmp/. A trailing / on a source name means "copy the contents of this directory". Without a trailing slash it means "copy the directory". This difference becomes particularly important when using the --delete option. rsync somehost.mydomain.com:: this would list all the anonymous rsync modules available on the host somehost.mydomain.com. Available Options -v, --verbose increase verbosity -q, --quiet decrease verbosity -c, --checksum always checksum -a, --archive archive mode -r, --recursive recurse into directories -R, --relative use relative path names -b, --backup make backups (default ~ suffix) --backup-dir make backups into this directory --suffix=SUFFIX override backup suffix -u, --update update only (don't overwrite newer files) -l, --links copy symlinks as symlinks -L, --copy-links copy the referent of symlinks --copy-unsafe-links copy links outside the source tree --safe-links ignore links outside the destination tree -H, --hard-links preserve hard links -p, --perms preserve permissions -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) -t, --times preserve times -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy whole files, no incremental checks --no-whole-file turn off --whole-file -x, --one-file-system don't cross filesystem boundaries -B, --block-size=SIZE checksum blocking size (default 700) -e, --rsh=COMMAND specify rsh replacement --rsync-path=PATH specify path to rsync on the remote machine -C, --cvs-exclude auto ignore files in the same way CVS does --existing only update files that already exist --ignore-existing ignore files that already exist on the receiving side --delete delete files that don't exist on the sending side --delete-excluded also delete excluded files on the receiving side --delete-after delete after transferring, not before --ignore-errors delete even if there are IO errors --max-delete=NUM don't delete more than NUM files --partial keep partially transferred files --force force deletion of directories even if not empty --numeric-ids don't map uid/gid values by user/group name --timeout=TIME set IO timeout in seconds -I, --ignore-times don't exclude files that match length and time --size-only only use file size when determining if a file should be transferred --modify-window=NUM Timestamp window (seconds) for file match (default=0) -T --temp-dir=DIR create temporary files in directory DIR --compare-dest=DIR also compare destination files relative to DIR -P equivalent to --partial --progress -z, --compress compress file data --exclude=PATTERN exclude files matching PATTERN --exclude-from=FILE exclude patterns listed in FILE --include=PATTERN don't exclude files matching PATTERN --include-from=FILE don't exclude patterns listed in FILE --version print version number --daemon run as a rsync daemon --no-detach do not detach from the parent --address=ADDRESS bind to the specified address --config=FILE specify alternate rsyncd.conf file --port=PORT specify alternate rsyncd port number --blocking-io use blocking IO for the remote shell --no-blocking-io turn off --blocking-io --stats give some file transfer stats --progress show progress during transfer --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE --bwlimit=KBPS limit I/O bandwidth, KBytes per second --read-batch=PREFIX read batch fileset starting with PREFIX --write-batch=PREFIX write batch fileset starting with PREFIX -h, --help show this help screen Environment Variables CVSIGNORE : The CVSIGNORE environment variable supplements any ignore patterns in .cvsignore files. See the --cvs-exclude option for more details. RSYNC_RSH : The RSYNC_RSH environment variable allows you to override the default shell used as the transport for rsync. This can be used instead of the -e option. RSYNC_PROXY : The RSYNC_PROXY environment variable allows you to redirect your rsync client to use a web proxy when connecting to a rsync daemon. You should set RSYNC_PROXY to a hostname:port pair. RSYNC_PASSWORD : Setting RSYNC_PASSWORD to the required password allows you to run authenticated rsync connections to a rsync daemon without user intervention. Note that this does not supply a password to a shell transport such as ssh. USER or LOGNAME : The USER or LOGNAME environment variables are used to determine the default username sent to a rsync server. HOME : The HOME environment variable is used to find the user's default .cvsignore file. Exit Values RERR_SYNTAX 1 - Syntax or usage error RERR_PROTOCOL 2 - Protocol incompatibility RERR_FILESELECT 3 - Errors selecting input/output files, dirs RERR_UNSUPPORTED 4 - Requested action not supported: an attempt was made to manipulate 64-bit files on a platform that cannot support them; or an option was speciifed that is supported by the client and not by the server. RERR_SOCKETIO 10 - Error in socket IO RERR_FILEIO 11 - Error in file IO RERR_STREAMIO 12 - Error in rsync protocol data stream RERR_MESSAGEIO 13 - Errors with program diagnostics RERR_IPC 14 - Error in IPC code RERR_SIGNAL 20 - Received SIGUSR1 or SIGINT RERR_WAITCHILD 21 - Some error returned by waitpid() RERR_MALLOC 22 - Error allocating core memory buffers RERR_TIMEOUT 30 - Timeout in data send/receive

Vulcan Logic Disassembler(VLD) Installtion

Vulcan Logic Disassembler used to generate opcode from zend engine encoded php files. It does not transform file into original code. It only show opcodes if the setting vld.active is set to 1. How to Install
  • Unpack the tarball: tar -xzf vld-0.8.0.tgz.
  • cd into the newly created directory.
  • Run "phpize" (Require php-devel package to be installed with Linux distribution)
  • Run "./configure"
  • Run "make install".
To get opcode run PHP from command line with -dvld.active=1 parameter. How to Run php -dvld.active=1 program.php
Improve GMAIL Performance

Improve GMAIL Performance

It is common problem for web developers who use firebug to debug JavaScript errors. Firebug may slow down Gmail by validating each XMLHttpRequests call. This problem is same for all ajax based application have make extensive XMLHttpRequest. Firebug is highly configurable. You can turn-off firebug for specific application or you can just enable when you need to debug an application. You can disable firebug for GMail and similar application or optimize it so that it will slow down application. Disable Firebug
  • To open Firebug, Click the green (Right Sign) icon in status bar of the browser window.
  • Select 'Disable Firebug for mail.google.com.' See image for more details.
Firebug optimization to improve GMail performance Optimize Firebug
  • To open Firebug, Click the green (Right Sign) icon in status bar of the browser window.
  • Click the Console tab.
  • Select Options.
  • Uncheck Show XMLHttpRequests.
  • Click the Net tab.
  • Select Options.
  • Check Disable Network Monitoring.
  • See Figure for more details
Firebug optimization to improve GMail performanceFirebug optimization to improve GMail performance

Linux VI Editor commands

In the graphical Linux world, vi editor now rarely used. But it is only choice at command prompt if graphical interface not available. The VI editor shipped with almost every Linux distributions.? The most hardest and annoying things with vi editor is to switching between Command Mode and Input Mode.?…continue reading →

Truncate text to specified character limit without cutting word

Self explanatory function to get limited text from long paragraph. function limit_text($mystring, $no_of_chars, $append_text) { //Varaible definition //$mystring -> Text string that need to be process //$no_of_chars -> Number of character to be display //$append_text -> Append text at the end of truncated text to show more to read. //like…continue reading →