0

After installing and configuring ppadial/automysqlbackup the following results occur in Ubuntu 16.04:

anacron:
    /etc/cron.daily/runmysqlbackup:
    run-parts: failed to exec /etc/cron.daily/runmysqlbackup: Exec format error
    run-parts: /etc/cron.daily/runmysqlbackup exited with return code 1

crontab:
    /etc/cron.daily/runmysqlbackup: 1: /etc/cron.daily/runmysqlbackup: !/bin/sh: not  found
    Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"

    # Checking for permissions to write to folders:
    base folder /var/backup ... exists ... ok.
    backup folder /var/backup/db ... exists ... writable? yes. Proceeding.
    chown: invalid option -- 't'
    Try 'chown --help' for more information

runmysqlbackup:

!/bin/sh

/usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf

chown root.root /var/backup/db* -R find /var/backup/db* -type f -exec chmod 400 {} \; find /var/backup/db* -type d -exec chmod 700 {} \;

Ideally, neither of these messages would occur! How to get there from here?

1 Answer 1

1
#!/bin/sh

Your interpreter is unknown so it does not no how to execute, as indicated by the error

!/bin/sh: not found

Putting a hash at the start of the first line should address your issue.

What you probably want is

chown root.root /var/backup/db* -R
find /var/backup/db* -type f -exec chmod 400 {} \; 
find /var/backup/db* -type d -exec chmod 700 {} \;
0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.