Command executed differently from terminal or in bash script

خرید بک لینک

I'm trying to automate a backup script with attic, but I'm stuck on this issue: the actual attic command performs differently when executed from the script and when executed directly in the terminal.

The script builds and executes the command:

/usr/bin/attic create --stats --verbose --exclude '/home/.cache' /media/attic-backup/paolo.attic::2016-08-27 /home

the command outputs the files backuped up from attic:

/home
/home/.attic
/home/.attic/keys
/home/.cache
/home/git
/home/git/.bash_history
etc etc

The /home/.cache directory should have been skipped...

However, if I execute the same command from the terminal I get:

$ /usr/bin/attic create --stats --verbose --exclude '/home/.cache' /media/attic-backup/paolo.attic::2016-08-27 /home
/home
/home/.attic
/home/.attic/keys
/home/git
/home/git/.bash_history
etc etc

Now the /home/.cache directory has been skipped.

It's not a matter of sudo.

Why the command in the script behaves differently?

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 440 تاريخ: شنبه 6 شهريور 1395 ساعت: 21:39

صفحه بندی