Skip to content

Instantly share code, notes, and snippets.

View educhip's full-sized avatar

Eduardo Sánchez de la Chica educhip

View GitHub Profile
@educhip
educhip / mirror_remote_directory_to_local_directory
Created May 19, 2022 08:20 — forked from pixeline/mirror_remote_directory_to_local_directory
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY