Skip to main content
Added direct reference to man page
Source Link
LMSingh
  • 185
  • 2
  • 7

Albeit rare but there ARE scenarios where a sync MAY NOT occur when you expect it. For example right after using sftp. REF: https://libssh2.org/libssh2_sftp_fsync.html

man sftp has a -f switch to force a sync.
https://man.openbsd.org/sftp
https://libssh2.org/libssh2_sftp_fsync.html

For OP @xuhdev since it is a storage server, below might be relevant to you.

I encountered this problem today and yesterday using a third party sftp front-end. So I had to ssh to the server and issue sync manually. That was 20 minutes after transferring files. So a UPS "may not" be always the only answer.

Since it is extremely rare (I've only run into it after multiple decades of using Linux and other UNIX variants) and YMMV, but might be worth setting up a cron to just do a sync every 5 minutes. Or use the "-f" switch on sftp.

Albeit rare but there ARE scenarios where a sync MAY NOT occur when you expect it. For example right after using sftp. REF: https://libssh2.org/libssh2_sftp_fsync.html

man sftp has a -f switch to force a sync.

For OP @xuhdev since it is a storage server, below might be relevant to you.

I encountered this problem today and yesterday using a third party sftp front-end. So I had to ssh to the server and issue sync manually. That was 20 minutes after transferring files. So a UPS "may not" be always the only answer.

Since it is extremely rare (I've only run into it after multiple decades of using Linux and other UNIX variants) and YMMV, but might be worth setting up a cron to just do a sync every 5 minutes. Or use the "-f" switch on sftp.

Albeit rare but there ARE scenarios where a sync MAY NOT occur when you expect it. For example right after using sftp.

man sftp has a -f switch to force a sync.
https://man.openbsd.org/sftp
https://libssh2.org/libssh2_sftp_fsync.html

For OP @xuhdev since it is a storage server, below might be relevant to you.

I encountered this problem today and yesterday using a third party sftp front-end. So I had to ssh to the server and issue sync manually. That was 20 minutes after transferring files. So a UPS "may not" be always the only answer.

Since it is extremely rare (I've only run into it after multiple decades of using Linux and other UNIX variants) and YMMV, but might be worth setting up a cron to just do a sync every 5 minutes. Or use the "-f" switch on sftp.

Source Link
LMSingh
  • 185
  • 2
  • 7

Albeit rare but there ARE scenarios where a sync MAY NOT occur when you expect it. For example right after using sftp. REF: https://libssh2.org/libssh2_sftp_fsync.html

man sftp has a -f switch to force a sync.

For OP @xuhdev since it is a storage server, below might be relevant to you.

I encountered this problem today and yesterday using a third party sftp front-end. So I had to ssh to the server and issue sync manually. That was 20 minutes after transferring files. So a UPS "may not" be always the only answer.

Since it is extremely rare (I've only run into it after multiple decades of using Linux and other UNIX variants) and YMMV, but might be worth setting up a cron to just do a sync every 5 minutes. Or use the "-f" switch on sftp.