I am using the shutil python module to copy files and directories on a linux redhat machine.
I wrote the following method, which takes in 2 params: src (the path of the file or dir that is being collected) and destination (the desired new path of where the collected log/dir is being pasted to).
def copy(src, destination):
print src+" not found"
When I get this error it usually means that one of the folders doesn't exist.
I wrote a simple script to to test this out. In the script below the backup folder does exist but the today folder does not. When I run the script I get the same error as you.
IOError: [Errno 2] No such file or directory: 'backup/today/my_file.txt'
import shutil shutil.copy("my_file.txt", "backup/today/my_file.txt")
If all of your folders do exist I would check to make sure the permissions on them have not changed.