跳至主要内容

博文

目前显示的是 十一月, 2011的博文

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

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 {} \;