Skip to content

A simple bash script to transfer files between two FTP servers / webhosting spaces without FXP.

License

Notifications You must be signed in to change notification settings

mhellmeier/FTP-Move-Server-Files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FTP Move Server Files

Issues MIT License

A simple bash script to move files over FTP / SSH from a source to a (different) destination server.

Table of Contents

About The Project

Current version: 0.1 (Beta Phase)

There are many cases where people want to transfer files and folders from a source server A to a destination server B (for example websites or backups). In most of the cases, the only possible solution to migrate a website to a new host is to download all files manually with a FTP client (like FileZilla) on your local computer and upload it to the new server afterwards. Direct transfers over FXP aren't possible in most of the cases due to restrictions in many (shared) webhosting packages. This small bash script will do the job for you!

If there is access to a VPS or Root Server C, I suggest executing the script on that machine to use the benefits of the data centre and to protect your own hardware and internet bandwidth.

Getting Started

Pre-Requirements

To use the script, these are the only things you need (will be installed with the install script):

  • Linux machine (or Mac or Winodws 10 with Linux Subsystem installed)
  • ftp installed (sudo apt install ftp)
  • lftp installed (sudo apt install lftp)
  • sshpass installed (sudo apt install sshpass)

Installation

  1. Clone the repository and go into it
git clone https://github.com/mhellmeier/FTP-Move-Server-Files.git
cd FTP-Move-Server-Files
  1. Install requirements and set permissions if not already done or simple use the small install script
chmod +x install.sh
sh install.sh
  1. Start the transfer script and follow the instructions shown in your terminal
./moveServerFiles.sh
  1. Enjoy!

Important Information

  • The script asks for passwords to connect to the source and destination hosts. Keep in mind that these will be used in the commands (plaintext!) to connect and download / upload content. It can be a security concern if the commands will be stored in the log history
  • To get rid of some certificate verification errors, the scripts doesn't make certificate checks
  • Remember to open FTP / SSH relevant ports in your firewall
  • Use it at your own risk!

Roadmap

Alle planned features, bugs and discussions can be found in the open issues.

Contributing

Feel free to fork the project, work in your personal branch and create a pull request or you simple interact in the issue section.

This is an open source project! Every contribution is greatly appreciated!

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Malte Hellmeier - LinkedIn

Project Link: https://github.com/mhellmeier/FTP-Move-Server-Files

About

A simple bash script to transfer files between two FTP servers / webhosting spaces without FXP.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages