tar:懦弱地拒绝创建空档案

-1 command-line bash backup scripts

这是我用于备份的脚本

#!/bin/bash

src_dir=/home/ubuntu/scripts
tgt_dir=/home/ubuntu/backups

curr_timestamp=$(date "+%Y-%m-%d-%H-%M-%S")
backup_file=$tgt_dir/$curr_timestamp.tgz
echo "Taking backup on $curr_timestamp"
echo "$backup_file"

#tar -cf back_file.tar ./*
tar czf  $backup_file --absolute-names $scripts
echo "Backup complete"
Run Code Online (Sandbox Code Playgroud)

它对我不起作用并出现错误

tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?

Rin*_*ind 5

$scripts如果这些行是全部,则为空