Makes a backup of the content of an FTP server with Python.

Jorge Maldonado Ventura 5771cc445b Update 'README.md' 7 年之前
.gitignore 76785d8f7d Initial commit 7 年之前
LICENSE 76785d8f7d Initial commit 7 年之前
README.md 5771cc445b Update 'README.md' 7 年之前
main.py 3d5a050490 Added backup script 7 年之前

README.md

Description

Makes a backup of the content of an FTP server with Python.

Usage

Just replace the strings 'REPLACE' with the information of your server. Here is the only part of the code you must change.

# Temporal destination for the unzipped backup.
# For example, /home/jorge/Código/site_backup/tmp
DESTINATION = 'REPLACE'
HOST = 'REPLACE'  # Replace with your FTP. For example, ftp.example.com
PASSWORD = getpass.getpass('FTP password: ')
PATH = '/'
PORT = 21
# Destination of the ZIP backup
# For example, /home/jorge/Código/site_backup/
ZIP_DESTINATION = 'REPLACE'

The code comments are self-explainatory. When you are done with this simple changes, just execute the Python file: python main.py.