How to create a tar file to a specific folder from a different folder

Solution 1:

Yes, put the directory in front of the "tar".

cd /
tar -cvf /where/to/put/it/dailybackup.tar root/backup/

and it will backup root/backup.

I would suggest to always makes backups with a relative path (as I used in my answer) otherwise you might overwrite the destination when you wanted to restore it elsewhere and then do a compare with the backup version.