Auto backup something with python in freebsd system
来源:互联网 发布:马哥教育python 编辑:程序博客网 时间:2024/05/21 21:13
This program just to backup all apache22 in the freebsd system to a .tar.gz file with date.
source code:
#!/usr/bin/env python
import os
import datetime
today= datetime.date.today().isoformat()
cmdtar = "tar -C /usr/local/www/ -cvf /usr/home/sino/source_bakup/apache22_"+today+".tar apache22"
cmdgz = "gzip /usr/home/sino/source_bakup/apache22_"+today+".tar"
print cmdtar
os.system(cmdtar)
print cmdgz
os.system(cmdgz)
source code:
#!/usr/bin/env python
import os
import datetime
today= datetime.date.today().isoformat()
cmdtar = "tar -C /usr/local/www/ -cvf /usr/home/sino/source_bakup/apache22_"+today+".tar apache22"
cmdgz = "gzip /usr/home/sino/source_bakup/apache22_"+today+".tar"
print cmdtar
os.system(cmdtar)
print cmdgz
os.system(cmdgz)
- Auto backup something with python in freebsd system
- source backup in python
- How to Backup Your System in linux
- Using UIScrollView with Auto Layout in iOS
- Using UIScrollView with Auto Layout in iOS
- Auto backup, Ver 1.3
- VB SourceSafe Auto Backup
- SourceSafe Auto Backup
- MySQL backup and point in time recovery with binary logs
- FreeBSD /etc/rc.conf backup
- simple auto backup ftp script
- oracle auto backup shell script
- Configuring Auto Backup for Apps
- Configuring Auto Backup for Apps
- Auto backup file to SVN
- Something with OpenGL
- something with QT install
- Backup Raspbx system
- Server 与Tomcat的三种连接方式介绍
- OA界面
- 期待已久的CSDN首届上海英雄会来啊
- TextureCoordinate3D纹理3D坐标节点
- 软件测试工程师面试问题选登
- Auto backup something with python in freebsd system
- 成为Java高手的25个学习目标
- hibernate3学习笔记(一)
- 谷歌官方博客透露明天将推Chrome浏览器
- IAX2 软电话的封装
- 让我们反射吧
- 串口接收数据c#
- string和int
- 20条web加速原则,值得参考[转]