Using Tar Zip

Hi,

I want to backup my SQL database using tar zip but I'm paranoid that I will archive it. What I mean is I want the files to stay where they are but make a zipped copy of the files as well, I don't want to delete the originals.

Is the command?

tar -cvzf databasename.tar.gz /var/lib/mysql/databasename/

or should I use

tar -xvzf databasename.tar.gz /var/lib/mysql/databasename/

Should I keep the last / on or remove it?

I understand v tells me some details, z zips the file, f allows you to give it a filename.

What does the x and/or c do?

Thanks,
Travis

-c option creates the tar file

-x option extracts files - which is what you would need on restore.

man tar for more details.