You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if that page is current documentation, or if this issue should have been posted in the "doc" or "user callback" repository.
This command will fail if the directory $HOME/.local/state does not exist: touch $HOME/.local/state/backintime_callback_log
That will prevent backintime from taking the snapshot.
That page also states that the script should return $0$. I assume that's supposed to be 0.
Here's an improved example script:
#!/bin/bash
LOG_FILE='/tmp/backintime_callback.log'
# Get current time
current_time=$(date +"%Y-%m-%d %H:%M:%S")
# Create file if it does not exist.
touch "$LOG_FILE"
# Append current time to the file.
echo -n "{$current_time}: " >> "$LOG_FILE"
# Iterate through all arguments.
for arg in "$@"
do
# Append argument to the file.
echo -n "$arg," >> "$LOG_FILE"
done
# Append newline character.
echo >> "$LOG_FILE"
exit 0
The text was updated successfully, but these errors were encountered:
Hello Dave,
please see PR #1899 that should fix your issue.
Please have a special look at the file doc/manual/src/user-callback.md. It contains the by you modified user-callback example. I put SPDX meta data to it and a license. Please let me know if the license (CC0-1.0 / public domain) is OK for you. Don't hesitate to ask.
Again thank you very much for your contribution. We appreciate it!
There's a mistake in the example of a user callback script on this page: https://backintime-docs.readthedocs.io/en/latest/user-callback/
I don't know if that page is current documentation, or if this issue should have been posted in the "doc" or "user callback" repository.
This command will fail if the directory $HOME/.local/state does not exist:
touch $HOME/.local/state/backintime_callback_log
That will prevent backintime from taking the snapshot.
That page also states that the script should return
$0$
. I assume that's supposed to be0
.Here's an improved example script:
The text was updated successfully, but these errors were encountered: