0

I have created a java code for performing a file, folder structure backup on the server. Now the code is working perfectly. The code looks into a specified directory and monitors changes made to files and creates a compressed backup.

So on a first time run , the code backs up all the files and folders. The consecutive times it makes a compressed backup of only the changed files / folders.

Currently the backup runs only when the client side program initiates a request. I made the backup script run on the server as a cron job now. It creates the compressed backup files each time it finds a difference in files. Each file is named as "OTA_[some_id]_[backup-timestamp]" .

I'm stuck at figuring out on how to make sure that the client syncs with the current data and doesn't need to re-sync the already synced compressed backup files.

NOTE: The client and server might not be running in the same timezones.

4

1 回答 1

0

使用 UTC 或 GMT 作为您的时间戳,这样您的客户端和服务器所在的时区就无关紧要了。

于 2013-09-27T05:41:16.897 回答