locked
Robocopy script in multiple instances works to move (to include delete) files, yet in one instance, same script, only copies RRS feed

  • Question

  • I use this script to move files older than one day from their original SQL server backups directory, to primary storage device.

    This script is identical across the varying SQL servers and is run with the same domain admin user credentials with all servers in the same domain.

    As mentioned in the title, in all instances it moves (and removes) the files to ready the drive for future backups, save one server, where it copies, but does not remove the file from original location.

    It sounds like a rights issue, however, it is a domain admin user, and domain admins are administrators on the servers, though I did add the users directly into the administrators group on the server in question, to no avail.

    Here is the script:

    robocopy \\10.10.10.10\Backup \\10.10.10.44\SQLBackups /MOV /MAXAGE:1 /COPYALL /V /LOG:WhySkip.txt

    Again, for all other SQL servers, via same script with only IP of initial server changed, the files are moved, yet on the one in question, only copied.

    All servers are in the same domain with the same security.

    Any help with this conundrum will be greatly appreciated.

    Stuart


    Stuart TechnoFile

    • Moved by Bill_Stewart Tuesday, December 16, 2014 5:53 PM Off-topic
    Monday, November 10, 2014 8:46 PM

Answers

  • Stuart, I would suggest you to check the source folder both Share and NTFS permissions.
    • Marked as answer by Bill_Stewart Tuesday, December 16, 2014 5:52 PM
    Tuesday, November 11, 2014 10:43 PM

All replies

  • Sorry but RoboCopy is not a script it is a system utility. Support for system utilities is in the platform forum for you OS.

    The issue you are asking about is also not a scriping issue it is a configuration or permisisons issue.  You need to post in the platform forum.


    ¯\_(ツ)_/¯

    Monday, November 10, 2014 9:02 PM
  • Thank you for the direction.

    Perhaps I will move from a batch file to a shell script, as well as revisit the rights issue (while not necessary on other servers, perhaps a local rather than domain admin).

    Regards,

    Stuart


    Stuart TechnoFile

    Tuesday, November 11, 2014 8:42 PM
  • Stuart, I would suggest you to check the source folder both Share and NTFS permissions.
    • Marked as answer by Bill_Stewart Tuesday, December 16, 2014 5:52 PM
    Tuesday, November 11, 2014 10:43 PM
  • Thank you for the direction.

    Perhaps I will move from a batch file to a shell script, as well as revisit the rights issue (while not necessary on other servers, perhaps a local rather than domain admin).

    Regards,

    Stuart


    Stuart TechnoFile

    The issue is not a scripting issue no matter what language you paste it in.  It is a configuration, system failure or a bug. You will need to put on your system technicians cap and debug the process.  Just imaging you are doing this for a user and go find the issue.


    ¯\_(ツ)_/¯

    Tuesday, November 11, 2014 11:17 PM
  • (?) A batch file is a shell script.

    A PowerShell script, however, is different.


    -- Bill Stewart [Bill_Stewart]

    Wednesday, November 12, 2014 2:47 AM
  • Thank you and I had included the Share permission after confirming the NTFS permissions.  No solution as yet.

    Stuart TechnoFile

    Wednesday, November 12, 2014 9:04 PM
  • Thank you.

    Stuart TechnoFile

    Wednesday, November 12, 2014 9:04 PM