python备份文件以及mysql数据库的脚本代码

上传:Impala32351m 浏览: 12 推荐: 0 文件:PDF 大小:25.01KB 上传时间:2020-12-31 07:21:13 版权申诉
复制代码 代码如下: #!/usr/local/python import os import time import string source=[‘/var/www/html/xxx1/’,’/var/www/html/xxx2/’] target_dir=’/backup/’ target=target_dir+time.strftime(‘%Y%m%d’) zip_comm=’zip -r %s %s’%(target,” “.join(source)) target_database=[‘DB_name1′,’DB_name2’] sql_user=’root’ sql_pwd=’x
上传资源
用户评论