• windows 下项目打包、备份、覆盖、md5check


    工具从网络自行下载,目前我存储在网盘上,可下载后调用

    1. 更新包打包、创建md5,压缩成.zip
    2. 现有项目按日期备份
    3. 覆盖项目并做md5check
      @echo off
      
      rem =================文件变量=============================================
      set zip=D:	ools7za.exe
      set md5=D:	oolsFileCheck_MD5.exe
      
      ::file_package
      cd /d %~pd0
      %md5% -create %~pd0app -k %~pd0appmd5.txt
      %zip% a -tzip %~pd0app.zip %~pd0app -r
      
      ::项目app
      ::判断旧解压包是否存在,存在删除
      ::更新包名:D:server_newapp.zip
      ::解压目录:D:server_newapp
      ::判断更新包是否存在,存在就解压更新包到指定目录
      
      ::file_ready
      if exist "D:server_newapp" (rd /s /q  D:server_newapp) >nul
      if not exist "D:server_newapp.zip" (exit) >nul
      if exist "D:server_newapp.zip" (%zip% x D:server_newapp.zip -oD:server_new) >nul
      
      ::file_backup
      ::exclude log files and/or folders
      echo .log > exclude.txt
      echo log >> exclude.txt
      xcopy /r /d /i /s /y /q /exclude:exclude.txt D:app D:server_bakapp"%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%"
      del exclude.txt
      
      ::file_update
      ::判断更新目录是否存在,更新目录:D:server_newapp
      ::若存在就将解压文件覆盖到指定目录
      if not exist "D:app" (exit) 
      if not exist "D:server_newapp" (exit)
      xcopy /r /d /i /s /y D:server_newapp D:app
      %md5% -check D:app -k D:server_newappmd5.txt > D:server_newmd5_check.log
      win_tools.bat
    4.  Mysqldump
      set YMDT=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%
      mysqldump --opt -u root --password=passwd db > D:dbbakdb_%YMDT%.sql
  • 相关阅读:
    【redis源码】(三)Zipmap
    【redis源码】(五)Ziplist
    mint 13 安装 phpunit
    【php】nginx phpfpm “session锁”问题
    linux 系统下 恢复被误删文件
    【python】python相关的那些事【一】python 中的变量
    【redis源码】(八) Intset.c
    【python】【scrapy】使用方法概要(三)
    【redis源码】(六)Ae.c
    【c++】关于默认构造函数
  • 原文地址:https://www.cnblogs.com/Mrhuangrui/p/7137612.html
Copyright © 2020-2023  润新知