<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; 数据备份</title>
	<atom:link href="http://www.osyunwei.com/archives/category/backup/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下用inotify-tool实时监控服务器文件</title>
		<link>https://www.osyunwei.com/archives/9023.html</link>
		<comments>https://www.osyunwei.com/archives/9023.html#comments</comments>
		<pubDate>Fri, 24 Apr 2015 02:06:47 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9023</guid>
		<description><![CDATA[说明： 服务器系统：CentOS 文件目录：/home/web/osyunwei.com 实现目的： 当/home/web/osyunwei.com下面除过cache目录之外，任何文件发生变化时，记录日志并保存。 具体操作： 一、安装Inotify-tools工具 1、查看服务器内核是否支持inotify ll /proc/sys/fs/inotify #列出文件目录，出现下面的内容，说明服务器内核支持inotify -rw-r--r-- 1 root root 0 Mar 7 02:17 max_queued_events -rw-r--r-- 1 root root 0 Mar 7 02:17 max_user_instances -rw-r--r-- 1 root root 0 Mar 7 02:17 max_user_watches 备注：Linux下支持inotify的内核最小为2.6.13，可以输入命令：uname -a查看内核 CentOS 5.X 内核为2.6.18，默认已经支持inotify 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 2、安装inotify-tools yum install make gcc gcc-c++ #安装编译工具 inotify-tools下载地址：http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz 上传inotify-tools-3.14.tar.gz到/usr/local/src目录下 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9023.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9023.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下Rsync+sersync实现数据实时同步</title>
		<link>https://www.osyunwei.com/archives/7447.html</link>
		<comments>https://www.osyunwei.com/archives/7447.html#comments</comments>
		<pubDate>Tue, 11 Mar 2014 02:27:02 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Rsync]]></category>
		<category><![CDATA[sersync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7447</guid>
		<description><![CDATA[前言： 一、为什么要用Rsync+sersync架构? 1、sersync是基于Inotify开发的，类似于Inotify-tools的工具 2、sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字，然后使用rsync同步的时候，只同步发生变化的这个文件或者这个目录。 二、Rsync+Inotify-tools与Rsync+sersync这两种架构有什么区别？ 1、Rsync+Inotify-tools （1）：Inotify-tools只能记录下被监听的目录发生了变化（包括增加、删除、修改），并没有把具体是哪个文件或者哪个目录发生了变化记录下来； （2）：rsync在同步的时候，并不知道具体是哪个文件或者哪个目录发生了变化，每次都是对整个目录进行同步，当数据量很大时，整个目录同步非常耗时（rsync要对整个目录遍历查找对比文件），因此，效率很低。 2、Rsync+sersync （1）：sersync可以记录下被监听目录中发生变化的（包括增加、删除、修改）具体某一个文件或某一个目录的名字； （2）：rsync在同步的时候，只同步发生变化的这个文件或者这个目录（每次发生变化的数据相对整个同步目录数据来说是很小的，rsync在遍历查找比对文件时，速度很快），因此，效率很高。 小结：当同步的目录数据量不大时，建议使用Rsync+Inotify-tools；当数据量很大（几百G甚至1T以上）、文件很多时，建议使用Rsync+sersync。 说明： 操作系统：CentOS 5.X 源服务器：192.168.21.129 目标服务器：192.168.21.127，192.168.21.128 目的：把源服务器上/home/www.osyunwei.com目录实时同步到目标服务器的/home/www.osyunwei.com下 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 具体操作： 第一部分：分别在两台目标服务器192.168.21.127，192.168.21.128上操作 一、分别在两台在目标服务器安装Rsync服务端 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，退出 setenforce 0 #立即生效 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7447.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7447.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux下Rsync+Inotify-tools实现数据实时同步</title>
		<link>https://www.osyunwei.com/archives/7435.html</link>
		<comments>https://www.osyunwei.com/archives/7435.html#comments</comments>
		<pubDate>Fri, 07 Mar 2014 06:51:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Inotify]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Rsync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7435</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 源服务器：192.168.21.129 目标服务器：192.168.21.127，192.168.21.128 目的：把源服务器上/home/www.osyunwei.com目录实时同步到目标服务器的/home/www.osyunwei.com下 具体操作： 第一部分：分别在两台目标服务器192.168.21.127，192.168.21.128上操作 一、分别在两台在目标服务器安装Rsync服务端 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，退出 setenforce 0  #立即生效 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT :wq! #保存，退出 /etc/init.d/iptables restart #最后重启防火墙使配置生效 3、安装Rsync服务端软件 yum install rsync xinetd #安装 vi [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7435.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7435.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux下自动备份Oracle数据库并删除指定天数前的备份</title>
		<link>https://www.osyunwei.com/archives/5960.html</link>
		<comments>https://www.osyunwei.com/archives/5960.html#comments</comments>
		<pubDate>Sat, 30 Mar 2013 16:17:55 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle数据库]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5960</guid>
		<description><![CDATA[说明： Oracle数据库服务器 操作系统：CentOS IP：192.168.0.198 端口：1521 SID：orcl Oracle数据库版本：Oracle11gR2 具体操作： 1、root用户登录服务器 mkdir -p /backup/oracledata  #新建Oracle数据库备份目录 chown -R  oracle:oinstall /backup/oracledata -R #设置目录权限为oinstall用户组的oracle用户（用户oracle与用户组oinstall是在安装Oracle数据库时设置的） 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 2、新建Oracle数据库备份脚本 vi /backup/oracledata/ordatabak.sh  #新建文件，输入以下代码 #!/bin/sh export ORACLE_BASE=/data/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_SID=orcl export ORACLE_TERM=xterm export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export LANG=C export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #以上代码为Oracle数据库运行账号oracle的系统环境变量设置，必须添加，否则crontab任务计划不能执行。 # oracle用户的系统环境变量路径：/home/oracle/.bash_profile date=`date +%Y_%m_%d`   #获取系统当前日期时间 days=7  #设置删除7天之前的备份文件 orsid=`192.168.0.198:1521/orcl`  #Oracle数据库服务器IP、端口、SID orowner=OSYUNWEI  [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5960.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5960.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>在Windows 客户端下备份远程Linux服务器上的Oracle数据库</title>
		<link>https://www.osyunwei.com/archives/5789.html</link>
		<comments>https://www.osyunwei.com/archives/5789.html#comments</comments>
		<pubDate>Wed, 27 Feb 2013 13:05:02 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Bat]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5789</guid>
		<description><![CDATA[1、在Windows上安装Oracle客户端软件（比如：win32_11gR1_client版本最好跟服务器Oracle版本相同） 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 2、在Windows上配置Oracle客户端连接 打开D:\app\Administrator\product\11.1.0\client_1\network\admin\tnsnames.ORA  #添加以下代码 128orcl= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.128)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) 128orcl #描述 92.168.0.128  #Oracle服务器IP orcl #Oracle数据库实例名 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容 版权所有,转载请注明出处及原文链接 3、开始-运行-cmd 打开命令行操作界面 输入： exp OSYUNWEI/123456@128orcl grants=y owner=OSYUNWEI file=d:\OSYUNWEI_DATA.dmp log=d:\OSYUNWEI_DATA.log Oracle用户名：OSYUNWEI 密码：123456 128orcl：Oracle客户端连接名 128orcl可以使用192.168.0.128:1521/orcl代替 grants=y 导出用户权限 owner=OSYUNWEI [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5789.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5789.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CentOS 6.3 Rsync服务端与Debian 6.0.5 Rsync客户端实现数据同步</title>
		<link>https://www.osyunwei.com/archives/4835.html</link>
		<comments>https://www.osyunwei.com/archives/4835.html#comments</comments>
		<pubDate>Mon, 16 Jul 2012 09:33:26 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Rsync]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[数据同步]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4835</guid>
		<description><![CDATA[说明： 1、Rsync服务端 系统：CentOS 6.3 IP地址：192.168.21.132 数据存放目录：/data/osyunwei 2、Rsync客户端 系统：Debian 6.0.5 IP地址：192.168.21.144 同步的目录：/data/osyunwei 实现目的： Rsync客户端每天凌晨3:00自动同步Rsync服务端/data/osyunwei目录中的数据到自己的/data/osyunwei目录 一、Rsync服务端配置 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存，关闭 shutdown -r now #重启系统 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT :wq! #保存 /etc/init.d/iptables restart #最后重启防火墙使配置生效 3、安装Rsync服务端软件 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4835.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4835.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6.3 Rsync客户端与Windows Server 2003 cwRsyncServer服务端实现数据同步</title>
		<link>https://www.osyunwei.com/archives/4788.html</link>
		<comments>https://www.osyunwei.com/archives/4788.html#comments</comments>
		<pubDate>Thu, 12 Jul 2012 14:25:39 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Rsync]]></category>
		<category><![CDATA[CentOS Rsync]]></category>
		<category><![CDATA[Windows Server cwRsyncServer]]></category>
		<category><![CDATA[数据同步]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4788</guid>
		<description><![CDATA[说明： 1、cwRsyncServer服务端 系统：Windows Server 2003 IP地址：192.168.21.134 数据存放目录：D:\osyunwei 2、Rsync客户端 系统：CentOS 6.3 IP地址：192.168.21.132 同步的目录：/osyunwei 实现目的： Rsync客户端每天凌晨3:00自动同步cwRsyncServer服务端D:\osyunwei目录中的数到/osyunwei目录 一、cwRsyncServer服务端配置 附件： cwRsyncServer下载地址： http://jaist.dl.sourceforge.net/project/sereds/cwRsync/4.0.3/cwRsyncServer_4.0.3_Installer.zip 解压cwRsyncServer_4.0.3_Installer.zip，双击cwRsyncServer_4.0.3_Installer.exe 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 Next I Agre（同意） 安装路径，默认即可 Next Service account：SvcCWRSYNC    （新建的一个系统账户） Type password：密码 Confirm password：密码 备注：系统会自动创建一个账户：SvcCWRSYNC来运行cwRsyncServer服务端程序 以上信息默认即可 Install （安装） Close（关闭），安装完成 开始-设置-控制面板-管理工具-服务 找到RsyncSever选项，双击打开 启动类型：自动 点“启动” 应用-确定 打开D盘，右键单击osyunwei文件夹，选择属性，切换到安全选项，点添加 输入：SvcCWRSYNC 确定 允许所有权限 应用，确定 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 打开C:\Program Files\ICW目录 用记事本打开rsyncd.conf，修改添加以下内容（修改之前先备份文件为rsyncd.confbak） [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4788.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4788.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Server 2003下cwRsyncServer服务端与cwRsync客户端数据同步实例教程</title>
		<link>https://www.osyunwei.com/archives/4678.html</link>
		<comments>https://www.osyunwei.com/archives/4678.html#comments</comments>
		<pubDate>Sat, 07 Jul 2012 03:20:46 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Rsync]]></category>
		<category><![CDATA[cwRsync]]></category>
		<category><![CDATA[cwRsyncServer]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[数据同步]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4678</guid>
		<description><![CDATA[说明： cwRsyncServer服务端   IP：192.168.21.128 cwRsync客户端   IP：192.168.21.129 实现目的： 把服务端D:\data目录中的数据通过任务计划定期同步到客户端D:\data目录中 附件： cwRsyncServer下载地址： http://jaist.dl.sourceforge.net/project/sereds/cwRsync/4.0.3/cwRsyncServer_4.0.3_Installer.zip cwRsync下载地址： http://jaist.dl.sourceforge.net/project/sereds/cwRsync/4.0.3/cwRsync_4.0.3_Installer.zip 具体操作： 一、在服务端安装cwRsyncServer 解压cwRsyncServer_4.0.3_Installer.zip，双击cwRsyncServer_4.0.3_Installer.exe 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 Next I Agre（同意） 安装路径，默认即可 Next Service account：SvcCWRSYNC    （新建的一个系统账户） Type password：密码 Confirm password：密码 备注：系统会自动创建一个账户：SvcCWRSYNC来运行cwRsyncServer服务端程序 以上信息默认即可 Install （安装） Close（关闭），安装完成 开始-设置-控制面板-管理工具-服务 找到RsyncSever选项，双击打开 启动类型：自动 点“启动” 服务启动成功，点关闭 确定 打开D盘，右键单击data文件夹，选择属性，切换到安全选项，点添加 输入：SvcCWRSYNC 确定 允许所有权限 应用，确定 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 打开C:\Program Files\ICW目录 用记事本打开rsyncd.conf，修改添加以下内容（修改之前先备份文件为rsyncd.confbak） uid = 0 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4678.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4678.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian下自动备份文件并上传到远程FTP服务器且删除指定日期前的备份Shell脚本</title>
		<link>https://www.osyunwei.com/archives/4631.html</link>
		<comments>https://www.osyunwei.com/archives/4631.html#comments</comments>
		<pubDate>Sat, 30 Jun 2012 16:17:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[自动备份]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4631</guid>
		<description><![CDATA[说明:  1、备份目录/home/osyunwei下面所有的文件到/home/osyunweibak里面，并且保存为osyunwei20120701.tar.gz的压缩文件格式（2012_07_01是指备份执行时当天的日期），最后只保留最近7天的备份 2、上传/home/osyunweibak里面的备份文件到远程FTP服务器上，并且只保留最近7天的备份。 3、FTP服务器:192.168.21.139 端口：21 账号：osyunwei 密码：123456 osyunweibak为备份文件存放目录（此目录需要预先在FTP服务器创建好） 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 实现步骤： 1、安装ftp命令 apt-get install ftp   #安装ftp 2、创建保存备份文件的目录：/home/osyunweibak cd /home  #进入目录 mkdir osyunweibak  #创建目录 3、创建备份脚本文件:/home/osyunweibak/osyunweibak.sh cd /home/osyunweibak touch osyunweibak.sh  #创建文件 nano osyunweibak.sh  #编辑文件，添加以下内容 #!/bin/sh BK_DR=/home/osyunweibak    #备份文件存放路径 DB_DR=/home/osyunwei   #要备份的文件目录 DAYS=7                    #DAYS=7代表删除7天前的备份，即只保留最近7天的备份 LINUX_USER=root           #系统用户名 date=` date +%Y%m%d `  #获取当前时间 tar  zcvf  $BK_DR/osyunwei$date.tar.gz  $DB_DR   #备份 chown -R $LINUX_USER:$LINUX_USER $BK_DR  [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4631.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4631.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian下自动备份MySQL数据库并上传到远程FTP服务器且删除指定日期前的备份Shell脚本</title>
		<link>https://www.osyunwei.com/archives/4614.html</link>
		<comments>https://www.osyunwei.com/archives/4614.html#comments</comments>
		<pubDate>Sat, 30 Jun 2012 14:04:30 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell脚本]]></category>
		<category><![CDATA[备份MySQL]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4614</guid>
		<description><![CDATA[说明:  1、备份MySQL数据库存放目录/var/lib/mysql下面的osyunweidata数据库到/home/mysql_data里面，并且保存为osyunweidata_bak_2012_06_30.tar.gz的压缩文件格式（2012_06_30是指备份执行时当天的日期），最后只保留最近7天的备份 2、上传/home/mysql_data里面的备份文件到远程FTP服务器上，并且只保留最近7天的备份 3、FTP服务器:192.168.21.139  端口：21 账号：admin 密码：123456  mysql_data为备份文件存放目录（此目录需要预先在FTP服务器创建好） 实现步骤： 1、安装ftp命令 apt-get install ftp   #安装ftp 2、创建保存备份文件的目录：/home/mysql_data cd /home  #进入目录 mkdir mysql_data   #创建目录 3、创建备份脚本文件:/home/mysql_data/mysql_databak.sh cd /home/mysql_data     #进入目录 touch mysql_databak.sh  #创建文件 nano  mysql_databak.sh  #编辑文件，输入以下内容 #!/bin/sh DUMP=/usr/bin/mysqldump    #mysqldump备份程序执行路径 OUT_DIR=/home/mysql_data   #备份文件存放路径 LINUX_USER=root            #系统用户名 DB_NAME=osyunweidata               #要备份的数据库名字 DB_USER=root              #数据库用户名 DB_PASS=123456             #数据库密码 DAYS=7                     #DAYS=7代表删除7天前的备份，即只保留最近7天的备份 cd $OUT_DIR                #进入备份存放目录 DATE=`date +%Y_%m_%d`      #获取当前系统时间 OUT_SQL="$DATE.sql"        #备份数据库的文件名 TAR_SQL="osyunweidata_bak_$DATE.tar.gz" #最终保存的数据库备份文件名 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4614.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4614.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS Rsync服务端与Windows cwRsync客户端实现数据同步</title>
		<link>https://www.osyunwei.com/archives/3769.html</link>
		<comments>https://www.osyunwei.com/archives/3769.html#comments</comments>
		<pubDate>Sun, 06 May 2012 05:24:34 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Rsync]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[cwRsync]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3769</guid>
		<description><![CDATA[说明： 1、Rsync服务端 系统：CentOS 5.5 IP地址：192.168.21.160 数据存放目录：/data/osyunwei 2、cwRsync客户端 系统：Windows Server 2003 IP地址：192.168.21.130 同步的目录：D:\osyunwei 实现目的： cwRsync客户端每天凌晨3:00钟自动同步Rsync服务端/data/osyunwei目录中的数据到D:\osyunwei目录 一、Rsync服务端配置 1、关闭SELINUX vi /etc/selinux/config #编辑防火墙配置文件 #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq #保存，关闭 shutdown -r now #重启系统 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 2、开启防火墙tcp 873端口（Rsync默认端口） vi /etc/sysconfig/iptables #编辑防火墙配置文件 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT :wq! #保存 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3769.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3769.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server Rsync服务端与Windows cwRsync客户端实现数据同步</title>
		<link>https://www.osyunwei.com/archives/3516.html</link>
		<comments>https://www.osyunwei.com/archives/3516.html#comments</comments>
		<pubDate>Fri, 13 Apr 2012 10:06:19 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Rsync]]></category>
		<category><![CDATA[cwRsync]]></category>
		<category><![CDATA[Ubuntu Server]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3516</guid>
		<description><![CDATA[说明： 1、Rsync服务端 系统：Ubuntu Server 11.10 IP地址：192.168.21.168 数据存放目录：/home/mysql_data 2、cwRsync客户端 系统：Windows Server 2003 IP地址：192.168.21.130 同步的目录：D:\mysql_data 实现目的： cwRsync客户端每天凌晨3:00钟自动同步Rsync服务端/home/mysql_data目录中的数据到D:\mysql_data目录 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 一、Rsync服务端配置 1、开启防火墙tcp 873端口（Rsync默认端口） 说明：Ubuntu默认安装是没有开启任何防火墙的，为了服务器的安全，建议大家安装启用防火墙设置，这里推荐使用iptables防火墙。 whereis iptables #查看系统是否安装防火墙 iptables: /sbin/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz #表示已经安装iptables防火墙 apt-get install iptables #如果默认没有安装，请运行此命令安装防火墙 iptables -L #查看防火墙配置信息，显示如下： Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3516.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3516.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows下MySQL数据库备份脚本（二）</title>
		<link>https://www.osyunwei.com/archives/3421.html</link>
		<comments>https://www.osyunwei.com/archives/3421.html#comments</comments>
		<pubDate>Wed, 04 Apr 2012 10:57:26 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Bat]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql备份]]></category>
		<category><![CDATA[mysql数据备份]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3421</guid>
		<description><![CDATA[说明： MySQL数据库安装目录：C:\Program Files\MySQL\MySQL Server 5.0 MySQL数据库存放目录：C:\Program Files\MySQL\MySQL Server 5.0\data MySQL数据库备份目录：D:\MySQLdata_Bak 实现目的：备份MySQL数据库存放目录中的mysql数据库到D:\MySQLdata_Bak目录，并且按照日期存放。 例如： D:\MySQLdata_Bak\mysql\20120404 D:\MySQLdata_Bak\mysql\20120405 1、把下面的文件保存为：mysql_bak.bat 放到D:\MySQLdata_Bak\目录中,如：D:\MySQLdata_Bak\mysql_bak.bat 2、在Windows中打开，开始-设置-控制面板-任务计划，把上面的批处理文件添加到任务计划中，设置每天某时间执行。 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/3421.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Windows下MySQL数据库备份脚本（二）<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3421.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3421.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows下MySQL数据库备份脚本（一）</title>
		<link>https://www.osyunwei.com/archives/3419.html</link>
		<comments>https://www.osyunwei.com/archives/3419.html#comments</comments>
		<pubDate>Wed, 04 Apr 2012 10:54:45 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Bat]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql备份]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3419</guid>
		<description><![CDATA[说明： MySQL数据库安装目录：C:\Program Files\MySQL\MySQL Server 5.0 MySQL数据库存放目录：C:\Program Files\MySQL\MySQL Server 5.0\data MySQL数据库备份目录：D:\MySQLdata_Bak 实现目的：备份MySQL数据库存放目录中的mysql数据库到D:\MySQLdata_Bak目录，按照日期存放， 并且只保留最近7天的数据 例如： D:\MySQLdata_Bak\mysql\20120404\mysql_bak.sql D:\MySQLdata_Bak\mysql\20120405\mysql_bak.sql 1、把下面的文件保存为：mysql_bak.bat 放到D:\MySQLdata_Bak\目录中,如：D:\MySQLdata_Bak\mysql_bak.bat 2、在Windows中打开，开始-设置-控制面板-任务计划，把上面的批处理文件添加到任务计划中，设置每天某时间执行。 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/3419.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Windows下MySQL数据库备份脚本（一）<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3419.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3419.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows下通过FTP自动备份数据到服务器并删除指定天数前的备份</title>
		<link>https://www.osyunwei.com/archives/1442.html</link>
		<comments>https://www.osyunwei.com/archives/1442.html#comments</comments>
		<pubDate>Fri, 16 Dec 2011 05:34:43 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Bat]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[备份]]></category>
		<category><![CDATA[自动备份]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=1442</guid>
		<description><![CDATA[说明： 1、要备份的文件在D盘根目录下面，以时间命名，例如 D:\data_db_201112130001.BAK D:\data_db_201112140002.BAK D:\data_db_201112150003.BAK 每天会自动生成一个新的文件，例如2011年12月16号，会自动生成data_db_201112160004.BAK 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 2、要把D:\下面当天生成的那个数据定时备份到FTP服务器上，例如，今天是2011年12月16号，要把data_db_201112160004.BAK这个文件上传到FTP服务器上，并且删除7天前的数据（只保留最近7天的备份） ftp服务器：192.168.1.1 端口：21 用户名：admin 密码：123456 备份文件目录databak 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 把下面的代码保存问data.bat，添加到windows的计划任务中，每天自动执行即可。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/1442.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Windows下通过FTP自动备份数据到服务器并删除指定天数前的备份<p><a rel="bookmark" href="https://www.osyunwei.com/archives/1442.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/1442.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
