Hi,
• The output of restic version
.
restic 0.16.2 compiled with go1.22rc2 on linux/amd64
• The complete commands that you ran (leading up to the problem or to reproduce the problem).
/usr/local/bin/backup
has the following lines,
export RESTIC_REPOSITORY='/mnt/backup'
export RESTIC_PASSWORD_COMMAND='/usr/local/bin/repo-password'
export RESTIC_COMPRESSION='auto'
export RESTIC_CACHE_DIR=~/.cache/restic
BACKUP_PATHS="/home /root /etc /var /usr/local/bin /usr/local/sbin /srv /opt"
mkdir -p "${RESTIC_CACHE_DIR}"
restic unlock
restic backup \
$BACKUP_PATHS \
--verbose \
--exclude-file=/etc/restic/excludes.txt \
--tag scheduled
/usr/local/bin/repo-password
has the following lines,
#!/bin/bash
echo "My Secure Super Password"
I applied the following after that,
sudo chmod 744 /usr/local/bin/backup
sudo chmod 700 /usr/local/bin/repo-password
But I am getting the following error when I am running sudo /usr/local/bin/backup
,
Resolving password failed: fork/exec /usr/local/bin/repo-password: exec format error
I don’t know why RESTIC_PASSWORD_COMMAND is unable to run that script and get the string. Any help would be really appreciated. Thank you for the time.
Source: Restic - ArchWiki