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

Jorge Maldonado Ventura 5771cc445b Update 'README.md' 7 yıl önce
.gitignore 76785d8f7d Initial commit 7 yıl önce
LICENSE 76785d8f7d Initial commit 7 yıl önce
README.md 5771cc445b Update 'README.md' 7 yıl önce
main.py 3d5a050490 Added backup script 7 yıl önce

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.