B
B
Bur Ov2020-11-13 23:10:24
bash
Bur Ov, 2020-11-13 23:10:24

Why is the archive corrupted after being sent from one server to another via ftp?

I archive the backup, send it to another server with a script:

cd $BACKUP
DUMPFILE=mysql-$NOW.tar.gz
$FTP -n $FTPS <<END_SCRIPT
quote USER $FTPU
quote PASS $FTPP
cd $FTPD
put $DUMPFILE
quit
END_SCRIPT

The files are loading, everything is fine, but they become broken! What could be the problem?
On the server where the archive is created, the archive opens fine, on the receiving server the archive is a couple of kb larger for some reason and already broken.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bur Ov, 2020-11-13
@burov0798

Corrected script:

cd $BACKUP
DUMPFILE=mysql-$NOW.tar.gz
$FTP -n $FTPS < quote USER $FTPU
quote PASS $FTPP
binary
cd $FTPD
put $DUMPFILE
quit
END_SCRIPT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question