Posts for August, 2011

No custom kernel via ssh

August 21, 2011 Posted in FreeBSD General

Tried to build a custom kernel on a canceled server, I couldn’t connect to it once the build started, I also couldn’t connect to it after the build finished and server rebooted. I don’t think I will build custom kernels ever again on remote servers.

DoS Attacks

August 21, 2011 Posted in FreeBSD General

If your server was down due to insufficient swap space, usually needed by large amount of MySQL connections, it’s a sign of DoS attacks. My servers started to get attacks earlier this year, and they were getting increasingly frequent. Here are some simple practices I have employed, they have been proved to be effective for my server in the last few months.
Read More

Backup Script

August 21, 2011 Posted in Command & Utility

My simple backup script
It runs daily with cron job.


# directory to backup

# directory to store backup files

# number of days to store backup files

# base backup file name

# remove files that are 30 or more days old.
find $DEST_DIR -mtime +$MAX_DAYS -maxdepth 1 -name ‘*.tgz’ -exec /bin/rm -f ‘{}’ +

# generate backup file name with date stamp, no hour/minute info for easier remote backup.
destfilename=$BASE_FILENAME`date “+%Y%m%d”`.tgz

tar czf $DEST_DIR$destfilename . &

Read More