Any windows command line guru's on here? Need help.
Discussion
Philemon said:
All things being considered, why don't you go to their dedicated forum and ask one of their "gurus" what they suggest, since this must be a recurrent issue, not unique to your application?
I work for the company that develops Ffenics, and the head developer is the one that told me that copying & pasting or archiving is fine. When he's done it manually in the past he's simply gone into computer management and closed the open shared files. Which is what I need to be able to do via the command line. LeeThr said:
I work for the company that develops Ffenics, and the head developer is the one that told me that copying & pasting or archiving is fine. When he's done it manually in the past he's simply gone into computer management and closed the open shared files. Which is what I need to be able to do via the command line.
Have you tried using the net files command?https://technet.microsoft.com/en-us/library/bb4907...
You can use it to list the open files and then force them, there is a bit more information here
http://www.techrepublic.com/article/find-open-file...
Maybe schedule a task to list the open files just before the backup over a period of time, as it might the same people keeping the files open.
anonymous said:
[redacted]
Our head developer, is actually the former head developer of DataEase. The product in itself does work very well. It's just this backup issue really. The issue is on a customers site to which we only have access to one PC, and as stated shutting down everything else just isn't an option.
RoboCopy + ShadowSpawn
ShadowSpawn will create a copy of a folder using VSS (which can cope with locked files) and then mount it as a drive, you can then RoboCopy / WinZip whatever the contents of this drive.
You need to be sure that there aren't any users actively working (e.g. VPN home workers, sales guys in another time zone) as I wouldn't know if Ffenics has any kind of transaction management so you could end up with a ShadowCopy taken when some files had just been updated but not others.
Chances are you will have no way of controlling this, so will just have to take the customers word for it when they say no one will ever be working at that time.
ShadowSpawn will create a copy of a folder using VSS (which can cope with locked files) and then mount it as a drive, you can then RoboCopy / WinZip whatever the contents of this drive.
You need to be sure that there aren't any users actively working (e.g. VPN home workers, sales guys in another time zone) as I wouldn't know if Ffenics has any kind of transaction management so you could end up with a ShadowCopy taken when some files had just been updated but not others.
Chances are you will have no way of controlling this, so will just have to take the customers word for it when they say no one will ever be working at that time.
I would buy a cheap backup program that is capable of mouting a VSS/Shadow Copy as previously recommended. Closing files as you are doing is just as bad as cutting users off, so the database can probably survive being backed up by a Shadow Copy. As you have the head developer on tap, they should be able to advise..
If the files are in one shared folder, you can alternatively unshare the folder at the command line before the backup:
NET SHARE {sharename | devicename | driveath} /DELETE
..and re-share it afterwards in the batch file, taking care to insert the correct share permissions using the /GRANT parameter:
NET SHARE sharename=driveath /REMARK:"text" [/CACHE:Manual | Automatic | No ]
This may however cause some users to see a red X on their network drive until they double click it again.
If the files are in one shared folder, you can alternatively unshare the folder at the command line before the backup:
NET SHARE {sharename | devicename | driveath} /DELETE
..and re-share it afterwards in the batch file, taking care to insert the correct share permissions using the /GRANT parameter:
NET SHARE sharename=driveath /REMARK:"text" [/CACHE:Manual | Automatic | No ]
This may however cause some users to see a red X on their network drive until they double click it again.
To put another spin on it - you don't need to do a copy (ignoring all the discussion above!), you can just zip it up in place using something like 7Zip - you can give it all kinds of useful arguments, including -ssw - http://sevenzip.osdn.jp/chm/cmdline/switches/share...
Then you just need to run something to copy it to the FTP server.
Then you just need to run something to copy it to the FTP server.
Robocopy seems to have done the trick, I modified my batch file to use robocopy to copy the directory from the server on to the work station we have access to, which was then archived successfully with no warnings about any files in use etc. And successfully uploaded to our FTP site.
Hummm just caught up with this thread - could it be that opportunistic locking is enabled on the client and server so the file is being locked even when it's not actually being used.
I doubt Ffenics actually requires oplocks since it will have its own internal shared lock but best to check with the developer.
See here for an explanation and how to disable them : http://www.dataaccess.com/whitepapers/opportunlock...
I doubt Ffenics actually requires oplocks since it will have its own internal shared lock but best to check with the developer.
See here for an explanation and how to disable them : http://www.dataaccess.com/whitepapers/opportunlock...
cornet said:
Hummm just caught up with this thread - could it be that opportunistic locking is enabled on the client and server so the file is being locked even when it's not actually being used.
I doubt Ffenics actually requires oplocks since it will have its own internal shared lock but best to check with the developer.
See here for an explanation and how to disable them : http://www.dataaccess.com/whitepapers/opportunlock...
The app devs probably haven't even thought about this tbh, one of the worst culprits in my experience is excel, it fks ssis up on a regular basis by holding a session lock and denying access.I doubt Ffenics actually requires oplocks since it will have its own internal shared lock but best to check with the developer.
See here for an explanation and how to disable them : http://www.dataaccess.com/whitepapers/opportunlock...
What OS?
ETA: is one that supports powershell
https://www.google.co.nz/search?q=powershell+close...
ETA: is one that supports powershell
https://www.google.co.nz/search?q=powershell+close...
Edited by lestag on Thursday 30th July 12:40
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff