m1ne Well-known member Mar 5, 2017 #1 I'm trying to compress the httpdocs folder with pigz and push it to my backup drive, what is wrong? Code: tar cf - /var/www/vhosts/httpdocs/* | pigz -p 4 > /backup/files/HTTPDOCS-`date -I`.tar.gz
I'm trying to compress the httpdocs folder with pigz and push it to my backup drive, what is wrong? Code: tar cf - /var/www/vhosts/httpdocs/* | pigz -p 4 > /backup/files/HTTPDOCS-`date -I`.tar.gz
m1ne Well-known member Mar 5, 2017 #3 I have this working, but it's slooooooooow. Code: cd /var/www/vhosts/ && tar -pczf httpdocs-`date -I`.tar.gz httpdocs/ && mv httpdocs-`date -I`.tar.gz /backup/files/
I have this working, but it's slooooooooow. Code: cd /var/www/vhosts/ && tar -pczf httpdocs-`date -I`.tar.gz httpdocs/ && mv httpdocs-`date -I`.tar.gz /backup/files/
eva2000 Well-known member Mar 5, 2017 #4 don't bother with piping tar to pigz, do it separately for more reliability and speed so tar first and then pigz the .tar file FYI, pigz will only speed up compression compared to gzip if you have more than 1 cpu thread available
don't bother with piping tar to pigz, do it separately for more reliability and speed so tar first and then pigz the .tar file FYI, pigz will only speed up compression compared to gzip if you have more than 1 cpu thread available
m1ne Well-known member Mar 5, 2017 #5 eva2000 said: don't bother with piping tar to pigz, do it separately for more reliability and speed so tar first and then pigz the .tar file FYI, pigz will only speed up compression compared to gzip if you have more than 1 cpu thread available Click to expand... I have 16 threads. So, something like this? Code: cd /var/www/vhosts/ && tar -cfp httpdocs-`date -I`.tar httpdocs/ && pigz --best httpdocs-`date -I`.tar && mv httpdocs-`date -I`.tar.gz /backup/files/ Does my command look okay? I'd like for the .tar to be deleted once it is compressed, hopefully this works. Last edited: Mar 6, 2017
eva2000 said: don't bother with piping tar to pigz, do it separately for more reliability and speed so tar first and then pigz the .tar file FYI, pigz will only speed up compression compared to gzip if you have more than 1 cpu thread available Click to expand... I have 16 threads. So, something like this? Code: cd /var/www/vhosts/ && tar -cfp httpdocs-`date -I`.tar httpdocs/ && pigz --best httpdocs-`date -I`.tar && mv httpdocs-`date -I`.tar.gz /backup/files/ Does my command look okay? I'd like for the .tar to be deleted once it is compressed, hopefully this works.