Posted by yolau
In this article I will be explaining how to backup the MBR record of a hard-drive.
The MBR record contains the partition table and bootloader.
Having a backup of the MBR is useful in case you want to copy data from an older drive to a new one or in case you want to restore data from [...]
Posted by copilas12
Hello. To dump a query to csv use this:
mysql –database=database –execute=”select a from b where a>1;” | sed ’s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > filename.csv
If you enjoyed this post, make sure you subscribe to my RSS feed!
- October 3rd
- Filed under: Tips
Posted by copilas12
Hello. I want to share some helpful exim commands for large mailservers:
1. froze messages to recipient root@host.localhost.com
/usr/sbin/exiqgrep -i -r root@host.localhost.com | /usr/bin/xargs exim -Mf
2. delete frozen messages
/usr/sbin/exiqgrep -z -i | /usr/bin/xargs exim -Mrm
3. delete messages older than X hours (X in seconds)
/usr/sbin/exiqgrep -o X -i | /usr/bin/xargs exim -Mrm
4. total messages in queue
/usr/sbin/exiqgrep | /usr/sbin/exiqsumm [...]
- October 3rd
- Filed under: Tips
Posted by copilas12
Hello. I had a trouble some time ago: i wanted to dump a large table (38 million rows, 5G size) without locking the table because the website can’t go down. So, here is the mysqldump command:
mysqldump –skip-add-locks –skip-lock-tables database > database.sql
or for just a table:
mysqldump –skip-add-locks –skip-lock-tables database table > database.table.sql
Hope this help.
If you enjoyed [...]
- October 3rd
- Filed under: Tips
Posted by copilas12
Hello. I found this browsing. I think it will be helpful to post it in here.
Here it is:
adddns – Adds a DNS zone.
addfpmail – Add frontpage mail extensions to all domains without them.
addfpmail2 -Add frontpage mail extensions to all domains without them.
addnetmaskips – Add the netmask 255.255.255.0 to all IPs that have no netmask.
addnobodygrp – [...]
- October 3rd
- Filed under: Tips
Posted by yolau
This is something that I recently come across and I thought that a tiny tutorial is needed here.
CentOS 5.x comes with vi as the default editor so when you run:
crontab -e
“Vi” is the editor that opens up.
I personally don’t like it and I wanted to change it to the good old nano.
If you are in [...]
- June 27th
- Filed under: Tips
Posted by yolau
This tutorial has been requested by one of our readers that was having trouble with the default cPanel backup script.
It is something well known that the cPanel backup script takes a long time to finish and consumes a lot o resources.
This is not a big problem if you have 100 accounts on the server but [...]
- December 22nd
- Filed under: Tips
Posted by yolau
Delivering mail to yahoo and google is so hard those days. Almost every server has had this problem even if it is not used to relay spam.
Installing DomainKeys can help your server deliver “clean” emails directly to your user’s inbox.
What are DomainKeys?
Well you will find more information on this topic at: http://antispam.yahoo.com/domainkeys
Installation is simple and [...]
Posted by yolau
I’ve noticed that on some new installs of cPanel 11.x + CentOS 5.0 there is a problem with cron jobs where the crons are not saved at all with no apparent reason and with no errors.
After some investigations I’ve found out that this is do to the fact that crontab doesn’t have the correct permissions.
It’s [...]