Hello. I'm stuck with the following issue. I made a backup script for Wordpress, which includes the installation directory and the database. They are stored in different paths.
At some point of the script, I create a tarball file including the directory and the sql flle with the command:
Code: Select all
tar -cf /path/to/archive.tar -C /path/to/wordpress/dir . /path/to/file.sql
The thing is that the Wordpress directory is archived under ./ in the tarball but the SQL file keeps its full path. I've been reading the tar manual, searched on the internet and tried several alternatives, but none seem to work.
I would like to concatenate, or append, the SQL file in the root of the tarball without the SQL's file full path.
Thanks in advance for your time.