Hi,
Hoping someone here can give me some advice with a script I'm working on. To start with here is the function I am having a problem with:
As you can see from the above code snippet I am trying to scp all the files (one by one) in a backup dir to another location on the local LAN.
My issues begins when the script reaches a file > 100MB. Pexpect seems to be timing out before the file has successfully copied. Some files that will be going over are > 1.5GB, so if possible I would like to find a resolution to this issue.
Thanks
Hoping someone here can give me some advice with a script I'm working on. To start with here is the function I am having a problem with:
Code:
for file in os.listdir(bkpdir):
child = pexpect.spawn('scp %s/%s USER@IPADDRESS:/folder/path/%s' % (bkpdir, file, date))
child.expect("password: ")
child.sendline("password")
data = child.read()
child.close()
As you can see from the above code snippet I am trying to scp all the files (one by one) in a backup dir to another location on the local LAN.
My issues begins when the script reaches a file > 100MB. Pexpect seems to be timing out before the file has successfully copied. Some files that will be going over are > 1.5GB, so if possible I would like to find a resolution to this issue.
Thanks