Chassis / db_backup

Backup and restore your database automatically
6 stars 4 forks source link

bad interpreter: No such file or directory #1

Closed cameronjonesweb closed 5 years ago

cameronjonesweb commented 7 years ago

Getting an error attempting to backup on vagrant destroy. @BronsonQuick mentioned it might be a Windows issue (running Windows 7 on this machine)

screenshot 2016-12-30 13 08 31

$ vagrant destroy
    default: Do you want to backup the database before destroying? [Y/n] y
==> default: stdin: is not a tty
==> default:
==> default: bash: /vagrant/extensions/db-backup/backup.sh: /bin/bash^M: bad interpreter: No such file or directory
Backup command failed
acasto commented 6 years ago

It's just the line breaks on the backup.sh file. There's several ways to fix it. I just did: vagrant ssh sed -i -e 's/\r$//' /vagrant/extensions/db-backup/backup.sh exit

pdennis33 commented 5 years ago

Thanks a lot! I was really confused for a while and this saved me what would have been a lot more time spent! I just used Notepad++ to fix it by opening backup.sh and then Edit -> EOL Conversion -> UNIX/OSX Format and saved it. Worked! Thanks!