auto_backup icon indicating copy to clipboard operation
auto_backup copied to clipboard

Error While transferring file to windows machine

Open SaravananSakthivel opened this issue 5 years ago • 0 comments

Following lines showing error while transferring data to windows machine,

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L212

Here sftp is already assigned with directory, cannot be assigned again.I think iine must be commented

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L219

Here line must be sftp.stat(f)

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L226

Here line must be sftp.put(fullpath, f)

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L233

Here line must be commented

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L237

You can change the existing line into sftp.chdir(None) sftp_list = sftp.listdir(pathToWriteTo) sftp.chdir(None) sftp.chdir(pathToWriteTo) for file in sftp_list:

https://github.com/Yenthe666/auto_backup/blob/f6dfe26080e60fb633069aaab4e54dbb159c7335/auto_backup/models/db_backup.py#L240

fullpath = file

Note:- I have noted this only when i transfer the file to windows machine but existing code working without above changes on ubuntu.

SaravananSakthivel avatar Oct 11 '19 10:10 SaravananSakthivel