I have some files in a directory; some of them are .qcow2 extensions. I want to backup only the files having .qcow2 extension.
Example: I have 5 files with .qc0w2 exxtension, they are: vm1.qcow2, vm2.qcow2,vm3.qcow2, vm4.qcow2 and minnow.qcow2. My intention is to use the gzip command to back them up into the /backup directory. It should be like the following: vm1.qcow2.backup.gz, vm2.qcow2.backup.gz, vm3.qcow2.backup.gz, vm4.qcow2.backup.gz and minnow.qcow2.backup.gz
I tried the following command:
gzip < *.qcow2 > /backup/*.qcow2.backup.gz
but this is not working. Can you please help me what mistakes I have done?