how to make sure some file all contents are include on the remote server.

As the topic,how can I make sure some file content append to the exsiting file.I’ve encounted like this issue.