Makes a backup of the content of an FTP server with Python.
Jorge Maldonado Ventura 5771cc445b Update 'README.md' | 7 rokov pred | |
---|---|---|
.gitignore | 7 rokov pred | |
LICENSE | 7 rokov pred | |
README.md | 7 rokov pred | |
main.py | 7 rokov pred |
Makes a backup of the content of an FTP server with Python.
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
.