Skip to content

Commit

Permalink
nc-backup-auto.sh: don't smash ncp.log
Browse files Browse the repository at this point in the history
append to log instead of clearing it
see #1232 (comment)
  • Loading branch information
schoetju authored Aug 7, 2021
1 parent 74018e1 commit 21c28f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/ncp/BACKUPS/nc-backup-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi
EOF
chmod +x /usr/local/bin/ncp-backup-auto

echo "0 3 */${BACKUPDAYS} * * root /usr/local/bin/ncp-backup-auto > /var/log/ncp.log 2>&1" > /etc/cron.d/ncp-backup-auto
echo "0 3 */${BACKUPDAYS} * * root /usr/local/bin/ncp-backup-auto >> /var/log/ncp.log 2>&1" > /etc/cron.d/ncp-backup-auto
chmod 644 /etc/cron.d/ncp-backup-auto
service cron restart

Expand Down

1 comment on commit 21c28f3

@schoetju
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... meanwhile realized, that this change messes up the ncp-backup-auto.
I don't know why - but the backup is hung up (ncp.log shows "backup files" but will never show "backup ...filename.... generated").
The nextcloud remains in maintenance-mode. (happened twice on my instance with 3days autobackup).
My workaround for the moment:
ncp-backup-auto >> /var/log/ncp-backup-auto.log
(= use a different log-file).
@nachoparker
Any idea?

Please sign in to comment.