<?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; Linux自动备份</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/linux%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD/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>Tue, 14 Apr 2026 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CentOS Linux自动备份文件到远程FTP服务器并删除指定日期前的备份Shell脚本</title>
		<link>https://www.osyunwei.com/archives/742.html</link>
		<comments>https://www.osyunwei.com/archives/742.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 05:26:04 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Linux自动备份]]></category>
		<category><![CDATA[Shell脚本]]></category>
		<category><![CDATA[自动备份文件]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=742</guid>
		<description><![CDATA[   说明:         我这里要把/home/wwwroot目录下面的所有文件备份到/home/wwwrootbak里面，并且保存为wwwroot20111103.tar.gz的压缩文件（20111103是指备份执行时当天的日期），然后只保留最近7天的备份，再把备份文件通过ftp服务器上传到指定空间，只保留最近7天的数据。 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 1、创建保存备份文件的目录：/home/wwwrootbak    cd /home    mkdir wwwrootbak 2、创建备份脚本文件:/home/wwwrootbak/wwwrootbak.sh    cd /home    cd  wwwrootbak    touch wwwrootbak.sh    vim wwwrootbak.sh    输入以下内容： 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 3、修改文件属性，使其可执行      chmod +x /home/wwwrootbak/wwwrootbak.sh 4、修改/etc/crontab    vi /etc/crontab    在下面添加      5 2 * * * root /home/wwwrootbak/wwwrootbak.sh    表示每天凌晨2点5分执行备份 5、重新启动crond使设置生效    [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/742.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/742.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS Linux自动备份MySQL数据库到远程FTP服务器并删除指定日期前的备份Shell脚本（二）</title>
		<link>https://www.osyunwei.com/archives/732.html</link>
		<comments>https://www.osyunwei.com/archives/732.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 02:20:59 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[Linux自动备份]]></category>
		<category><![CDATA[Shell脚本]]></category>
		<category><![CDATA[自动备份MySQL]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=732</guid>
		<description><![CDATA[说明: 我这里要把MySQL数据库存放目录/var/lib/mysql下面的pw85数据库备份到/home/mysql_data里面，并且保存为mysql_data20111103.tar.gz的压缩文件格式（20111103是指备份执行时当天的日期），然后只保留最近7天的备份，再把备份文件通过ftp服务器上传到指定空间，并且在远程ftp服务器只保留最近7天的备份。 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 实现步骤： 1、创建保存备份文件的目录：/home/mysql_data cd /home mkdir mysql_data 2、创建备份脚本文件:/home/mysql_data/mysql_databak.sh cd /home cd mysql_data touch mysql_databak.sh vim mysql_databak.sh 输入以下内容： 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 3、修改文件属性，使其可执行 chmod +x /home/mysql_data/mysql_databak.sh 4、修改/etc/crontab #添加计划任务 vi /etc/crontab #在下面添加  5 23 * * * root /home/mysql_data/mysql_databak.sh #表示每天23点05分执行备份 5、重新启动crond使设置生效 /etc/rc.d/init.d/crond restart chkconfig crond on #设为开机启动 service crond start #启动 每天你在/home/mysql_data目录下面可以看到类似mysql_data20111103.tar.gz这样的压缩文件，如果需要恢复文件的时候，只需要把这个文件解压即可。 解压缩命令：tar -zxvf  mysql_data20111103.tar.gz [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/732.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/732.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
