Currently I'm working on my bash script which does backup mysql data, the only problem I got is the parameter of tar which was working on the debian, but its not working on FreeBSD.
Yes, I have read this: Deleting files after adding to tar archive
And the answer is the solution I was always using on debian - I mean the --remove-files parameter.
Executing the following command on FreeBSD:
tar --remove-files -jcPf $DIR/$Y/$M/$D/mysql-$HOUR.tar.bz2 *.sql
Throws the following error:
tar: Option --remove-files is not supported
I havent found anything similar to the --remove-files param. while reading the man tar, so what is the solution?