0

I have a specific task to accomplish and doing it manually takes many hours, so I'd like an automated way to do it.

Relevant Info:
- DB is 80GB (35GB compressed with best compression in WinRAR)
- DB is across a VPN connection in the cloud
- Want to compress DB, copy back to Enterprise
- Copying via SMB almost always will result in corruption, FTP is preferred method across the VPN to prevent the corruption
- Would like to verify MD5 checksums before copying, and after to make sure it is not corrupted.

Manual Steps:
- MD5 checksum on DB backup
- Use WinRAR to compress latest backup with best compression
- MD5 checksum on rar archive (takes about an hour)
- FTP the rar file over the VPN to Enterprise center
- MD5 checksum on rar archive
- Uncompress
- MD5 checksum on DB backup

In all reality I can probably skip doing the checksum on the rar archive. Call me anal retentive if you will. I think the best thing would be to find an MD5 checksum command line utility, and do the MD5 checksum and WinRAR compression via a batch script. I am unsure how to do the FTP part though. Suggestions? Thanks guys. Cheers.

  • possible duplicate of [How to ftp with a batch file?](http://stackoverflow.com/questions/16158138/how-to-ftp-with-a-batch-file) – Mark Feb 07 '14 at 20:31

1 Answers1

0

Windows has an FTP.EXE which uses passive file transfers and can be scripted with the -s:file switch.

If you use 7-Zip instead of WinRar then you will probably get superior compression on the highest settings, and it can create ZIP and well as 7z files.

Another advantage for you is that 7-Zip has a switch 7z l -slt file.zip which you can get the checksum from the archive without another calculation.

You can download the backup again to do another checksum.

I put this in an answer block so it's easier to read the points.

foxidrive
  • 40,353
  • 10
  • 53
  • 68