2011年11月22日星期二

4 steps to delete account in Gerrit DB




4 steps to delete account in DB.

Delete from accounts where preferred_email=’’;
delete from account_ssh_keys where account_id='';
delete from account_external_ids where external_id='gerrit:*’;
delete from account_external_ids where external_id='username:*’;
whatever it was in H2 database and postgres db .

H2:

ssh -p 24198 localhost gerrit gsql

Postgres:
psql


2011年11月19日星期六

tar with /

When I try to tar -jcvf /, that will caused error
tar: Removing leading `/' from member names

The fix coomand
tar -jcvPf /opt.tar /opt
If you put the P after f, it will create P file...

untar tar -jxvPf /opt.tar if no P option, it will have the error as the same.

#!/bin/bash
DATE=`date "+%F-%H-%M"`
/u01/postgres/9.0/bin/pg_dump reviewdb > /var/backup/reviewdb_$DATE.sql
/usr/bin/bzip2 /var/backup/reviewdb_$DATE.sql
find . -name "*.sql.bz2" -mtime +90 -exec rm -rf {} \;

2011年11月18日星期五

Gerrit send mail without to and error with reviewers

We have problem since users said they can't receive mail from the gerrit server. For IT perspective, we do nothing, because of Gerrit (2.2.X) is different with the others, especially for access control.
The fix thing, disable the group options and unchecked two options.



2011年11月17日星期四

Oralce Solaris 11 released

Oracle released Solarsi 11 on 2011/11/11.
http://www.oracle.com/technetwork/server-storage/solaris11/overview/index.html

But apparently it was not so good at what they expect for the release, no one cheer for that.

RazorSQL

RazorSQL有Windows版

注册码为:G84BKS8JQC7HRJ8V
www.razorsql.com
 
不是一般的好用