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

Jorge Maldonado Ventura 5771cc445b Update 'README.md' před 7 roky
.gitignore 76785d8f7d Initial commit před 7 roky
LICENSE 76785d8f7d Initial commit před 7 roky
README.md 5771cc445b Update 'README.md' před 7 roky
main.py 3d5a050490 Added backup script před 7 roky

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.