I am looking at adding in crontab the command to automatically generate the backups with restic.
The command I execute in cron is the following:
*/1 * * * * source /root/.bashrc; /usr/bin/restic -r $RESTIC_REPOSITORY backup /home/vmail/domain.com --tag FromCron >> /var/log/restic.log 2>> /var/log/restic.log
I have looked at redirecting the output of the commands in files to review it and I get the following:
unknown command "/home/vmail/domain.com" for "restic"
It’s as if the command doesn’t understand that what is happening is the backup path. I have also tried to execute it with a script and it gives the same error. Does anyone know that I am leaving?