Archive for June, 2010

MySQL – backup details stored procedure all including database

June 4, 2010 Leave a comment

To backup the mysql database

No lose all backup, case of migration:
mysqldump –user=root –password=**** –all-databases > /tmp/dnbe_database.sql

Option 1: full database and functions structures but no data
shell> mysqldump –user=root –password=root -R -d db > /tmp/20090201-nodata.sql

Option 2: full database but without cdr, slavecdr table structure and data
shell> mysqldump –user=root –password=root -R –ignore-table=db.cdr –ignore-table=db.slavecdr db > /tmp/20090201-data.sql

Categories: MySQL

CentOS – usb mout

June 4, 2010 Leave a comment

Usb device connected, now need to access it (make sure that fuse and fuse-ntfs-3g is installed in case for windows)

1. blkid

[root@www win]# blkid
/dev/mapper/VolGroup01-LogVol01: TYPE=”swap”
/dev/mapper/VolGroup01-LogVol00: UUID=”1e2a5f27-69d3-4b08-b92c-208af1e8a377″ TYPE=”ext3″
/dev/sda1: LABEL=”/boot” UUID=”671a3eb0-9fda-41a4-a73e-e04c71257803″ TYPE=”ext3″
/dev/VolGroup01/LogVol00: UUID=”1e2a5f27-69d3-4b08-b92c-208af1e8a377″ TYPE=”ext3″
/dev/VolGroup01/LogVol01: TYPE=”swap”
/dev/sdc1: TYPE=”ntfs”
[root@www win]#

2. [root@www win]# mount /dev/sdc1 /media/win


* verify its mounted…
[root@www win]# cat /etc/mtab
/dev/mapper/VolGroup01-LogVol00 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/sdc1 /media/win fuseblk rw,allow_other,blksize=4096 0 0
You have new mail in /var/spool/mail/root
[root@www win]#

Categories: centOS, Fedora 12

CentOS – rpmforge repository setup

June 4, 2010 Leave a comment

Package repository route.

1. Download

[root@www yum.repos.d]# cd /tmp

[root@www tmp]# wget

–2010-06-04 11:49:56–
Connecting to||:80… connected.
HTTP request sent, awaiting response… 302 Found
Location: [following]
–2010-06-04 11:49:56–
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 16575 (16K) [application/x-rpm]
Saving to: `rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm’

100%[=======================================================================================================================================================================>] 16,575      –.-K/s   in 0.09s

2010-06-04 11:49:57 (186 KB/s) – `rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm’ saved [16575/16575]

[root@www tmp]# rpm –import
[root@www tmp]# rpm -K rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK

2. Install

[root@www tmp]# rpm -i rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
3. Done

[root@www tmp]# yum check-update

Categories: centOS, Fedora 12