Tuesday, April 28, 2015

Backup Pemalas - Linux

#!/bin/bash
# backup from Shinjriu Web Hosting to Server 10.1.XX.XX dir /home/backup

OUTPUT=`rsync --bwlimit=250 -avzhe ssh --progress root@124.217.245.XXX:/backup /home/backup`

CURDATE=`date`
sendmail -oi harithd@xxxxxxxx.com << EOF
From: Sysadmin
To: harithd@xxxxxxxx.com
Subject: SERVER INFO: Backup Done on $CURDATE

Salam..

The server has just Rsync Backup dir on Shinjiru server to BackupServer on $CURDATE.


Backup Output:

$OUTPUT

EOF

Friday, January 10, 2014

Simple Backup Script Using WinSCP

Simple backup script using WinSCP

===================================================
echo off

SET HOUR=%time:~0,2%
SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2% 
SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%

if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)

cd C:/backup
mkdir %dtStamp%
cd %dtStamp%
mkdir database
mkdir homedir


"C:\WinSCP\WinSCP.com" /command "open root:password@10.1.20.103" "option batch abort" "option confirm off" "option exclude log/" "cd /backup/mysql-daily-backup" "lcd C:/backup\%dtStamp%\database" "get *" "cd /home/" "lcd C:/backup\%dtStamp%\homedir" "get *"

===================================================


Change Webmin Default Port 10000

Go to Terminal and edit following config file:
vi /etc/webmin/miniserv.conf

    find port=10000 and change to other value


-
Harith

Saturday, February 13, 2010

FreeBSD command to stop IPFW Firewall

To stop the firewall, issue the command: 
# /etc/rc.d/ipfw stop
To disable firewall remove following line from /etc/rc.conf file:
firewall_enable="YES"
OR set it as follows:
firewall_enable="NO"