Archive for the ‘Linux’ Category

automatic mysql db backup

# cd /etc/cron.daily/ # touch /etc/cron.daily/dbbackup-daily.sh # chmod 755 /etc/cron.daily/dbbackup-daily.sh # vi /etc/cron.daily/dbbackup-daily.sh Then copy following lines into file with Shift+Ins #!/bin/sh now=”$(date +’%d_%m_%Y_%H_%M_%S’)” filename=”db_backup_$now”.gz backupfolder=”/var/www/vhosts/example.com/httpdocs/backups” fullpathbackupfile=”$backupfolder/$filename” logfile=”$backupfolder/”backup_log_”$(date +’%Y_%m’)”.txt echo “mysqldump started at $(date +’%d-%m-%Y %H:%M:%S’)” >> “$logfile” mysqldump –user=mydbuser –password=mypass –default-character-set=utf8 mydatabase | gzip > “$fullpathbackupfile” echo “mysqldump finished at $(date +’%d-%m-%Y %H:%M:%S’)” >> […]

Installing php, mysql, phpMyAdmin on LinuxMint

sudo apt-get install apache2 sudo apt-get install php5 libapache2-mod-php5 sudo apt-get install mysql-server apt-cache search pdo|grep php /*find how pdo package is callled) sudo apt-get install php-db php5-mysql

escort kutahya escort bornova escort beylikduzu escort amasya escort diyarbakir