Quick Python script to backup remote directory using ftp

I looked around for some other ways to do this but decided to just code this up in Python. It connects to a remote Linux server using ftp and recursively copies all the files and directories back to a Windows machine.

Here is the source:

This is an example of the ease of use of Python for quick scripting. It uses a low-level ftp library called ftplib.

Bobby

About Bobby

I live in Chandler, Arizona with my wife and three daughters. I work for US Foods, the second largest food distribution company in the United States. I have worked in the Information Technology field since 1989. I have a passion for Oracle database performance tuning because I enjoy challenging technical problems that require an understanding of computer science. I enjoy communicating with people about my work.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Quick Python script to backup remote directory using ftp

  1. Hi Bobby,
    Thanks for posting this – we use sftp and certificates – could this script be modified for that?
    Thanks
    Steve

Leave a Reply