Shadow_Walker Posted October 26, 2017 Posted October 26, 2017 We have just migrated all data to a new server and we just want to check the log files over however we have transfered across nearly 1000 users but we only want to see which users have failed to copy files. Is there anyway to get the relevant data from the log file?
Edu-IT Posted October 27, 2017 Posted October 27, 2017 Search for ‘error’ or relevant word with the log files?
Shadow_Walker Posted October 27, 2017 Author Posted October 27, 2017 Search for ‘error’ or relevant word with the log files? Yes search failed but have 1000 of entries to go through...
sparkeh Posted October 27, 2017 Posted October 27, 2017 Search failed? Do you mean that it didn't find the word 'error'? Maybe there are no errors?
ADMaster Posted October 27, 2017 Posted October 27, 2017 When you do a robocopy there are a few columns of data, copied, skipped, failed. So for every copy job your going to find the word failed. try starting robocopy from powershell and allowing it to pass the exit code back, then write that to a log file. Here is a reference on exit codes https://blogs.technet.microsoft.com/deploymentguys/2008/06/16/robocopy-exit-codes/ barring that, I think the most common errors are time out and accessed denied so try searching on those terms. I'm sure there is a powershell equivalent, but also try running them through grep on a linux box. cat log.txt | grep denied ah looks like select-string https://communary.net/2014/11/10/grep-the-powershell-way/
Shadow_Walker Posted October 27, 2017 Author Posted October 27, 2017 Search failed? Do you mean that it didn't find the word 'error'? Maybe there are no errors? Sorry rushed my response. On the log file under each user it says failed and then 0 if no errors happen or if it has failed it will give us a number. I just want a way of searching for failed ones.
ewanc1234 Posted October 27, 2017 Posted October 27, 2017 (edited) Doing this will find any results that have had more than 0 error's If you try this in notepad++ versions 6 or higher (without the quotes): "^failed (?!.*0).*$" The red is the word that it is looking forAnd the orange is what it is excluding Below is an example of how i tested it, make sure that you set the search mode to "regular expression" or it will not work! Edited October 27, 2017 by ewanc1234
sparkeh Posted October 27, 2017 Posted October 27, 2017 Sorry rushed my response. On the log file under each user it says failed and then 0 if no errors happen or if it has failed it will give us a number. I just want a way of searching for failed ones. sorry I get it now :s So, it appears that you searched the word 'failed' but as above, it would be better to search the word 'error' to find every line with an error code.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now