Menu

#7 Binary Replace with Backup

open
nobody
None
5
2009-10-24
2009-10-24
Anonymous
No

Binary replace with backup option fails with "Error: could not remove: file.ext.bak" for all files in which it is supposed to change. I suspect that the program tries to delete the .bak backup files it is supposed to create before actually creating them.

In my case I didn't want to be forced to use the backup option with binary mode when the find and replace string lengths are different so I recompiled to remove this restriction (bye-bye 2 lines below).

//ERRPRINTF( "Error: too dangerous; must specify --backup" );
//return -2;

The new executable worked fine without the --backup switch, but the original problem remains if I use the --backup switch.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB