I have a python script that is running in two places, two different, but similar commands:
os.system("tar cf - -C %s . 2>/dev/null 3>/dev/null | 7za a -p%s -si %s 1>/dev/null 2>/dev/null 3>/dev/null" % (cf, self.config.get(jn, "archpass"), filename))
os.system("tar -Jchf - -C %s . 2>/dev/null 3>/dev/null | 7za a -p%s -si %s 1>/dev/null 2>/dev/null 3>/dev/null" % (cf, self.config.get(jn, "archpass"), filename))
This script is used to backup websited on a Ubuntu server. So most of files are html/php/js/jpg.
I need to understand this command more in order to have an idea if there is place for improvement.
**Question 1)** What's the difference between:
tar cf
and tar -Jchf
.
Unfortunately tar --help
didn't help me understand the additional -Jf
parameters.
**Question 2)** Is tar also archiving? What could be the purpose of sending everything to 7za
? Is it doing a double archivisation?
Asked by Pikk
(187 rep)
Feb 5, 2022, 04:05 PM
Last activity: Feb 5, 2022, 05:05 PM
Last activity: Feb 5, 2022, 05:05 PM