Thursday, 19 December 2024

WINSCP upload file that is deleted issue & solutions with RSYNC & GIT pipeline & GIT Pipeline intro & Samples

 People use file uploader applications to upload files to  a server.

However when u first uploaded a folder containing files A, B,C , then you upload folder A again to server containing file E, F.


Your server will contain file A,B, C, E,F


To address this issue, and for a potential fix need to use to

  • RSYNC (https://blog.pair.com/2018/03/13/rsync/)
    • A linux based to to remotely send file from one server to another server
    • Consider cmd -avzhe this will let the file/folder you transfered from to completely overwrite same file folder you have in destination server 
  • Consider pulling in destination server using GIT directly
  • If unable to pull in destination server using GIT, consider using CI/CD (continous integration) in GIT to reach destination server
    • Build a pipe line to run in a schedule or run manually on a target branch
      • The pipline executes a job which is YAML file format which usually contains a bash script you write
      • (https://docs.gitlab.com/ee/ci/pipelines/)
        • The bash script usually pulls the branch into piple containers then execute cmd like rsync to send the file to remote server
      • For GIT LAB you need maintainer role to save global variables used in bash script in CI/CD

No comments:

Post a Comment