惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
罗磊的独立博客
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
量子位
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
B
Blog RSS Feed
腾讯CDC
博客园_首页
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
博客园 - Franky
S
SegmentFault 最新的问题
N
Netflix TechBlog - Medium
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
D
Docker
P
Privacy & Cybersecurity Law Blog
S
Securelist
V
V2EX
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
T
Tor Project blog
The Hacker News
The Hacker News
Microsoft Azure Blog
Microsoft Azure Blog
AWS News Blog
AWS News Blog
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
Recent Announcements
Recent Announcements
Cloudbric
Cloudbric
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Latest news
Latest news
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recorded Future
Recorded Future
V2EX - 技术
V2EX - 技术

博客园 - lodestar

一张图掌握数据存储 使用xtrabackup实现mysql定时热备份 开发篇1:使用原生api和Langchain调用大模型 预热篇2:从RNN到Transformmer 预热篇1:大模型训练显卡选型 macbook安装scala、hadoop、saprk环境 centos6.5 squid安装 一次linux服务器黑客入侵后处理 linux上搭建svn服务器 android中listView的几点总结 使用template method模式简化android列表页面 andorid进度条使用 andorid定时器应用 - lodestar Android网络应用(第一部分) - lodestar 错误数据导致java.lang.IllegalArgumentException:Unsupported configuration attributes 使用ACEGI搭建权限系统:第三部分 acegi安全框架使用:第二部分 使用ACEGI实现权限控制,第一部分 ajax实现用户名存在校验
Windows系统下Oracle每天自动备份
lodestar · 2016-11-30 · via 博客园 - lodestar

linux和unix下面使用shell可以很方便实现,如果windows环境下可以结合计划任务实现

  1. 创建备份目录d:\backup, 创建批处理命令Bak.bat,编写备份脚本  

exp user/passwd@orcl DIRECT=Y BUFFER=100000 FILE=D:\backup\scdd%date:~0,10% OWNER=('scdd') LOG=D:\backup\data.log  

forfiles /p "D:\backup" /s /m *.dmp /d -3 /c "cmd /c del @path"

说明:  

exp命令是oracle提供的dump备份命令,其中的%date:~0,10%是DOS里取日期的命令,例如:C:\Users\qyy>echo %date:~0,10%得到2016-11-30  

forfiles是windows的文件查找命令,查找在backup,dmp后缀产生三天的文件,找到后执行删除操作

2.Windows定时任务每日自动执行批处理文件 3.保留最近三天的文件,自动删除以前日期的备份文件

forfiles参数说明:  

 /P 可是搜索的路径。在我们这里就是要在哪个目录寻找要删除的文件  

/M 根据搜索掩码搜索文件。默认为*,如果要找备份处dump文件,格式为*.dmp  

/D 文件修改时间在某个时间之前或者之后。-3 表示3天之前的文件。

/s 包含子目录  

/C 表示为每个文件执行的命令,如果要删除该文件可以为"cmd /c del /F /s /q @file"。其中变量@file表示该文件名 f s q表示强制静默删除可以不用;cmd /c表示执行字符串指定的命令然后终断  

其中@file可以返还如下结果,我们这里用@path  

@file - returns the name of the file.  

@fname - returns the file name without extension.  

@ext - returns only the extension of the file.  

@path - returns the full path of the file.  

@relpath - returns the relative path of the file.  

@isdir - returns "TRUE" if a file type is a directory, and "FALSE" for files.   @fsize - returns the size of the file in bytes.  

@fdate - returns the last modified date of the file.  

@ftime - returns the last modified time of the file