Score:0

mysqldump in postrotate fails with automatic rotate

cn flag
flm

I have this simple logrotate script

/var/backups/mysql/wordpress.sql.gz {
    rotate 7
    daily
    sharedscripts
    missingok
    nocompress
    postrotate
        /usr/bin/mysqldump wordpress | /usr/bin/gzip >/var/backups/mysql/wordpress.sql.gz
    endscript
}

This works fine when I run it by hand with logrotate -f script but not with the automatic rotate. I get an empty wordpress.sql so I assume it's the mysqldump that fails but I don't know why.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.