I'm looking for any solution that will allow me to emulate functionallity similar to Dropbox/rsync using only FTP protocol and command-line.
The general problem is, that I have to run it on a very limited Linux (actually NAS), so I can't install / use to complex solutions (not enough resources to run) and/or GUI utils, as I have no GUI there. SSH also works weak on that NAS and is not present at all on one of destinations.
What I need, is to have a command-line (bash) script or program that I will be able to run periodically (via CRON) that will assure that
destination are identical:
- all files on both sides copied to both sides,
- if two files of the same name exists, copy newest version of a file to both sides,
- delete on one side all files that are missing on another one.
Of course, this solution must support iteration on all subfolders of both source and destination, for this to work succesfully -- there will be a large directory structure on both sides.
I've tried many backups solutions, but most of them failed for one of these reasons:
- unable to create exact duplicate copy of both sides and offering incremental backup instead,
- not able to be run directly from command-line, on very limited Linux distro.
I was advised to use Unison and give it a good try. This really looks good, but it uses SSH, and I'm unable to establish SSH connection to one of my destinations (not supported) -- i.e. FTP access is the only available way.
The perfect solution for me would be anything that I can run (command-line or configuration) like this:
something.sh path/to/local/folder ftp://user:email@example.com/path/to/folder
If it does exists at all...