2010-11-16

用rsnapshot做远程备份

rsnapshot真的很好用

基本的配置见这篇 Ubuntu下使用rsnapshot做远程备份 就可以了

值得注意的是 Debian 5.0 lenny的rsnapshot 1.3.0有个bug,如果设置了ssh_args会不干活,rsync提示
rsync error: syntax or usage error (code 1) at main.c(1220) [sender=3.0.3]


解决方法就是升级rsnapshot到squeeze中的1.3.1即可

2010-11-01

这两天碰到的几个技术问题

1. MySQL5.1导出,然后MySQL5.0导入报错
提示: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE' 云云

bug报告见 http://bugs.mysql.com/bug.php?id=25162

解决方法就是手动修改 foobar.sql 文件,找到报错的那行
一般是类似下行这行的东西

UNIQUE KEY `IDX_BASE` (`entity_type_id`,`entity_id`,`attribute_id`,`store_id`) USING BTREE ,

把 USING BTREE 挪个位置,改成下面这样即可

UNIQUE KEY `IDX_BASE` USING BTREE (`entity_type_id`,`entity_id`,`attribute_id`,`store_id`) ,

2.iredmail 0.6.1在debian lenny上安装postfix-policyd时出错,提示数据库连接失败,用户名root,密码空
除非你的MySQL root密码是空密码,否则一般都会失败的
解决办法就是用apt单独安装postfix-policyd,就会出现要求输入MySQL密码的对话框

3.卸载amavis-new 后重装 amavisd-new 失败
提示

Creating/updating amavis user account...
Broken amavis system user found. To insure data-safety,
it is up to you the local administrator to remove the broken
amavis user, or repair it so that it is sane
dpkg: error processing amavisd-new (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
amavisd-new

原因是 amavisd-new 会创建 amavis 和 amavis组,但卸载的脚本有bug没有删除amavis用户。
userdel amavis 删除 amavis用户

再继续安装即可

bug报告见 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495629