tar.bz2 cannot stat: no such file or directory

I am compressing 60G of a backup of a bank using the command below, but the log informs the following messages. What can it be?

Command:

BZIP=-9 tar -cvjf /backup/backup-mysql-'date "+%Y%m%d"'.tar.bz2 /backup/backup-mysql

Error:

tar: "+%Y%m%d".tar.bz2: Cannot stat: No such file or directory
tar: Removing leading `/' from member names

Upvotes: 0

Views: 671

Answers (1)

user1673573
user1673573

Reputation: 26

Try with following command:

tar -cvjf /backup/backup-mysql-$(date "+%Y%m%d").tar.bz2 /backup/backup-mysql

Upvotes: 1

Related Questions