I want upload the tar file simultaneous to a remote ftp. But this code doesn't work.
tar cvzf - /backup | openssl aes-256-cbc -salt -k "password" | split -b 100m | curl -u user:password ftp.site.com/backup.tar -T -
Try walking before you run, by which I mean, understand each individual command before chaining them into a pipeline.
The first problem I see is the use of split - it's not going to produce any output on stdout, as its job is to split input into files. So it's only writing to your current working directory, not to curl. Those multiple files will need to be handled differently.
So your one-line command of:
tar cvzf - /backup | openssl aes-256-cbc -salt -k "password" | split -b 100m | curl -u user:password ftp.site.com/backup.tar -T -
Needs to get translated to something with a loop like this:
tar cvzf - /backup | openssl aes-256-cbc -salt -k "password" | split -b 100m - bkup
for file in bkup*
do
curl -u user:password ftp.site.com/$file -T $file
done