Q – 备份Linux,即使是使用增量备份,执行的结果也是全备份。
http://www.symantec.com/connect/forums/linux-incrementals-using-modified-time
A – 新建备份任务,默认地,BE会使用“完全 – 备份文件 – 使用存档位(重置存档位)”。该存档位在Linux下不能被正确识别,得不到此标识,BE就默认地进行了全备份。
解决方案 – 在任务属性里,修改常规选项,把备份方法修改为“完全 – 使用修改时间”。对应的,增量或者差异备份的任务属性也要修改。
Q –
Prerequisite Warning: C++ Compatibility Pack
The installer was unable to determine the version of C++ Compatibility package installed on the computer. The compatibility package is required for this version of the Symantec Backup Exec Remote Agent for Linux or UNIX Servers. Install the appropriate C++ compatibility patch for GNU Compiler Collection (GCC) 3.3, or refer to the following link for more information:
A -下载必须的GCC库
yum install libstdc++.so.5
Q – remote Agent for Linux设置为自动启动
A –
chkconfig –add VRTSralus.init
chkconfig VRTSralus.init on
backup
把那个RALUS_RMALS_RAMS-4164.5.tar.gz的安装包传输至服务器安装,注意一点,需要新建个目录,把该文件放进去,否则,该文件直接解压的话,将在该目录生成一大堆文件。(symantec怎么会这么制作安装包?不够严谨)
具体过程和手册中所讲一样,不累述了。
安装完成后,需要编辑/etc/VRTSralus/ralus.cfg,加入一下几行,否则BackExec服务器将不能正常发现该Agent。
Software\Symantec\Backup Exec for Windows\Backup Exec\Agent Browser\TcpIp\AdvertisementPort=6101
Software\Symantec\Backup Exec for Windows\Backup Exec\Agents\Advertise Now=1
Software\Symantec\Backup Exec For Windows\Backup Exec\Debug\AgentConfig=0
Software\Symantec\Backup Exec For Windows\Backup Exec\Debug\VXBSAlevel=5
Software\Symantec\Backup Exec for Windows\Backup Exec\Engine\Agents\Advertise All=1
Software\Symantec\Backup Exec For Windows\Backup Exec\Engine\Agents\Advertise Now=0
Software\Symantec\Backup Exec For Windows\Backup Exec\Engine\Agents\Advertisement Purge=0
Software\Symantec\Backup Exec For Windows\Backup Exec\Engine\Agents\Advertising Disabled=0
详细的解释,BackExec的手册中有说明,以上参数用于开启消息发布,和介质服务器通信。
如果添加完以上参数,不能正常通信,请查看beremote进程是否正常。/opt/VRTSralus/bin/VRTSralus.init可以控制beremote进程,如果beremote进程不受该指令控制,可以尝试重启计算机,再刷新介质服务器,以恢复和该agent的通信。
backup
Ubuntu(我想应该包括debian)和RHEL的细微区别体现出来了,以下脚本在RHEL上执行没问题,
11 0 * * * tar -g /data0/snapshot_data_www -p cvzf /data1/backup_zone/data_www/data_www_`date ‘+%Y%m%d’`.tar.gz /data0/data_www #backup the data_www directory
在Ubuntu上,就屡次调试不过。经过调试,认为存在以下差异
1.Ubuntu的tar -g 不支持完整路径名;可以用变量取代之
2.Ubuntu的tar在cron中,不支持v(可视化)参数;可以不用,对备份没有影响
3.Ubuntu的tar在cron中,%符号有其他意义,代表命令换行;可以在前面加个\符号,将其变为转义字符。
最后的方案如下(已调试成功)
Read the rest of this entry
backup, Linux
2009-12-15 update
之前的定期计划放到crongtab,会产生错误,可以查看/var/log/syslog
#grep -i CMD /var/log/syslog.0
Dec 25 00:11:01 krc /USR/SBIN/CRON[4273]: (root) CMD (tar -g /data0/snapshot_data_www -p -cvzf /data1/backup_zone/data_www/da
ta_www_`date ‘+)
Dec 25 00:11:30 krc Transfer: Get GETCMD error.
Dec 25 01:01:01 krc /USR/SBIN/CRON[12617]: (root) CMD (tar -cvzf /data1/backup_zone/data_conf/usr_local_webserve_`date ‘+)
Dec 25 01:01:33 krc Transfer: Get GETCMD error.
查看以上的日志,不难发现,备份语句被截断了,在换行的时候。因此,可以有以下2种修补方案
1.手工把语句截断,利用分行符%
2.把语句放到sh脚本里,使用bash /root/scriptname.sh这样的方式执行(推荐,因为看起来更简洁)
附注:备份任务最好以高权限用户执行,因为要备份的内容文件权限各不一样,其他用户不能保证都有权限。因此,建议用root权限执行。鉴于root权限的高风险,请编辑crontab之前,先在试验环境全部run过。
Read the rest of this entry
backup, Linux
MySQL在Linux应用环境中,一般都是最重要的业务,定期备份是必须的。一般有如下几种策略:
1.拷贝文件系统 – 停止服务,copy 数据库目录;启动服务
(需要停止服务一段时间,期间不接受写入操作)
2.MySQL自带工具mysqldump,这也是最常用的方式
(能在备份的过程lock tables,一定程度上保证数据的一致性)
3.MySQL自带工具mysqlhotcopy
(文件系统级拷贝工具,能在备份过程lock tables,只对MyISAM表格有效)
4.热备(未跑在生产环境中,等做完发上来)
Read the rest of this entry
backup, Mysql
软件环境:
Vmware Workstation 6.5
Ubuntu 8.04 LTS
Paragon Partition Management Server 7.00
Norton Ghost 11.5
Read the rest of this entry
backup, Linux