Announcement

Collapse
No announcement yet.

Calculate CRC on Remote FTP Server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculate CRC on Remote FTP Server

    I have used BC for a long time and I love it. I use it both on local files and over FTP. However, the other week the FTP server I'm using had a disk crash, and not all the files were restored correctly. Some have become corrupted, but the file dates and sizes are correct. The support department says they don't have a correct backup.

    I have maybe 10 GB of data on the server, in files up to 300 MB. The files contain research data. I'd like to know which files need to be restored on the server, as transferring them all would take literally ages. I have a copy of all the files at home, but they were built up over time.

    The problem is that the CRC check in BC seems to try to download each file before calculating the CRC! That makes the CRC option useless in my case. There must be a way to calculate the CRC remotely, and just transmit the 8 bytes or so of CRC instead of each 300 MB data file? It's a Linux server with FTP, SFTP and SSH login capabilities.

    Do I need to find a special Linux app to make a list of remote checksums, and then compare this list with the local checksums, or have I overlooked this feature in Beyond Compare?

  • #2
    Re: Calculate CRC on Remote FTP Server

    Beyond Compare does support server side generation of CRCs for FTP servers. The problem is that very few FTP servers support server side CRC generation.

    The FTP command is XCRC, you'll see it in a verbose log if the FTP server supports it. If the server doesn't support XCRC, BC will download the entire file and calulate the CRC locally.

    I'm pretty sure Serv-U on Windows supports XCRC, but I'm not sure which FTP servers support it under Linux.
    Chris K Scooter Software

    Comment


    • #3
      Re: Calculate CRC on Remote FTP Server

      Another option is to ask your hosting company to generate a BC snapshot file with CRCs of the files on the FTP server.

      Then you can compare the snapshot to your local files to determine which ones are corrupted.
      Chris K Scooter Software

      Comment


      • #4
        Re: Calculate CRC on Remote FTP Server


        Thanks for the help. I've tried logging in manually to the FTP server, and it does not recognise the command "XCRC".
        Too bad.

        A snapshot of the files on the server would be great. However, it's a Linux server. Is there a tool for generating a BC snapshot on a Linux server?

        Comment


        • #5
          Re: Calculate CRC on Remote FTP Server

          We're working on a Linux port of BC, but as of now there isn't a tool for generating snapshots on the server.

          If you can get your hosting company to connect to the ftp server over their local network and generate a snapshot for you, that is probably your best option.
          Chris K Scooter Software

          Comment


          • #6
            Re: Calculate CRC on Remote FTP Server

            Do I need to find a special Linux app to make a list of remote checksums, and then compare this list with the local checksums, or have I overlooked this feature in Beyond Compare?
            There's a utility md5sum that could be helpful here. It can generate a list of MD5 message digests for the specified files:

            Code:
            md5sum * >md5.log
            It's probably already present on linux, and a Windows port is available at http://www.etree.org/md5com.html

            It doesn't recurse through subdirectories though.

            Comment

            Working...
            X