0

I have a database transfer script, which uses bzip2 to minimise locking of large databases on a server.

First line is

ssh root@server "mysqldump db | bzip2 >/root/db.sql.bz2"

This works on many servers, but on a new Ubuntu 14.04 server the file created on the server has a question mark appended:

ls -la gt*
-rw-r--r-- 1 root root 2364190 Nov 21 00:25 db.sql.bz2?

Any idea why this may be happening?

osgx
  • 90,338
  • 53
  • 357
  • 513
jdog
  • 2,465
  • 6
  • 40
  • 74

1 Answers1

1

Does your script have CR+LF line-endings? Make sure to use Unix (LF) line endings.

Berend de Boer
  • 1,953
  • 20
  • 15