0

If I fwrite 'w' a file on a Windows server with ntfs loggong (like my local xampp server), effectively overwriting it (vrs 'a' append), does the ntfs server secretly keep a historical copy of my old file somewhere on the hard drive? If so, can I wipe it in php/js?

$filename = 'd:\\xxx.txt';
$handle = fopen($filename, 'w'); 
fwrite($handle, $info);

Can I get the FILE_APPEND_DATA in php? Maybe via a js/php lib?

Is there auto history logging on a linux web server (via a fwrite to my website's root directory)? (here, i assume GoDaddy or whomever does regular backups, but I don't mean that here).

dako
  • 41
  • 5

1 Answers1

0

What you are referring to, I assume, is file versioning. NTFS supports Shadow Copies, which are block level snapshots of the file system, to aid in backing up a filesystem. For the versions of windows that support it, you can recover a prior version of a file. Using file recovery built into windows. Since these are block snapshots, there is no way of deleting an individual version of a file, but it is also not meant to be a robust "record all versions of this file" system. The snapshots are taken before important system related events and at certain scheduled occasions, so there's no guarantee about whether or not a snapshot occurred that captured a particular version of a file.

There is no built in linux os mechanism that keeps versions of your files, nor does GoDaddy or any other Hosting company I know of, do regular backups of files (except maybe on a shared server). Those are things you have to pay extra for and set up yourself, usually for an extra fee.

gview
  • 14,876
  • 3
  • 46
  • 51