I have written a simple bash where I'm connecting to an external storage via curlftpfs and then running tar in it to make a backup of my filesystem (ubuntu 18). It looks something like this:

curlftpfs -o ssl,no_verify_peer,utf8,allow_other ftp://username:password@personaladdress.myfritz.net:61111/WD/Backup $BACKUP_DIR

tar -cvpzf $BACKUP_DIR/backup-$DATE.tar.gz --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=$BACKUP_DIR --exclude=/dev --exclude=/sys <other excludes> /

Unfortunately it doesn't seem to work. It will create an empty tar with a size of 0 on my backup-drive and I will get following error message:

gzip: stdout: Input/output error
gzip: write error: Input/output error
tar: /mntbackup/backup-2019-03-06-001111.tar.gz: Funktion write fehlgeschlagen: Datenübergabe unterbrochen (broken pipe)
tar: Child returned status 1
tar: Error is not recoverable: exiting now

What is the reason and what I'm doing wrong?

  • Did you try your tar command without mounted the remote $BACKUP_DIR? – mnille Mar 6 at 10:28
  • Yes, it works if it not mounted - so the connection seems to be the issue – spcial Mar 6 at 10:37
  • 1
    You could try to test it step by step. Do you have the another device in your network which has more CPU power and which you can use? Maybe the problem is related to the not very powerful fritzbox. – mnille Mar 6 at 10:45
  • I just changed the logic to not use curlftpfs anymore but to just transfer the single file with ftp to my fritzbox. That works at least :-) – spcial Mar 12 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.