<?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/tag/%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>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>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>
