###Current State:###
Server 1 (Local Server) is pushing files to Server 2 (Remote Server) at pre-determined intervals throughout the day. The files received by Server 2 are processed and added to a database.
The connection at Server 1 is not very stable and at times disconnects interrupting the file transfer resulting in corrupted or missing files.
The files on Server 1 uses the following naming convention and is incremented daily:
S[number].TXT
i.e. S015980, S015981, etc.
*Unfortunately the file naming setup cannot be altered or modified.
Edit: Files are stored in a single directory, they are archived daily at 11pm EST in a date named folder.
###Future State:###
Server 2 receives files from Server 1, validates filenames, connects remotely to Server 1 if files are missing otherwise process.
Missing/Corrupted files
- SFTP into Server 1, copy missing or 0kb files
- The script should store the last filename received (the numbers increment forever), incremented by one and used to validate the starting file in the next batch. **If you have a better approach, I am open to it.
Ex: four files are sent, only three are received: S015980, S015981, S015983
I would like to use a shell script running on Server 2 to perform the actions outlined above. If you have a better way we are open to suggestions. Also if you require server specific details - please let me know exactly what details you're looking for. I am not sure how long it would take to develop the script so please let me know.
I look forward to working with you and developing a long-term working relationship.
Server 1 (Local Server) is pushing files to Server 2 (Remote Server) at pre-determined intervals throughout the day. The files received by Server 2 are processed and added to a database.
The connection at Server 1 is not very stable and at times disconnects interrupting the file transfer resulting in corrupted or missing files.
The files on Server 1 uses the following naming convention and is incremented daily:
S[number].TXT
i.e. S015980, S015981, etc.
*Unfortunately the file naming setup cannot be altered or modified.
Edit: Files are stored in a single directory, they are archived daily at 11pm EST in a date named folder.
###Future State:###
Server 2 receives files from Server 1, validates filenames, connects remotely to Server 1 if files are missing otherwise process.
Missing/Corrupted files
- SFTP into Server 1, copy missing or 0kb files
- The script should store the last filename received (the numbers increment forever), incremented by one and used to validate the starting file in the next batch. **If you have a better approach, I am open to it.
Ex: four files are sent, only three are received: S015980, S015981, S015983
I would like to use a shell script running on Server 2 to perform the actions outlined above. If you have a better way we are open to suggestions. Also if you require server specific details - please let me know exactly what details you're looking for. I am not sure how long it would take to develop the script so please let me know.
I look forward to working with you and developing a long-term working relationship.
Comments
Post a Comment