<p><br>
On Mar 2, 2014 7:40 PM, "Mike" <<a href="mailto:miguelcoam@gmail.com">miguelcoam@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
> I have the script that make a backup file (this process is ok), but now i wish compress the file on tar file format. But i have problem syntax in the line of the tar function.<br>
><br>
> The error is<br>
><br>
> [root@master ~]# python bkp_db.py<br>
>   File "bkp_db.py", line 19<br>
>     tar = tarfile.open(dumpfile)+'.tar.gz','w:gz'))<br>
>                                                  ^<br>
><br>
> Note: The 'dumpfile' is the variable for my dump generate with format db_02-27-14<br>
><br>
> ......<br>
> tar = tarfile.open(dumpfile)+'.tar.gz','w:gz')<br>
> tar.add(os.path.join(dumpfile), arcname=dumpfile)<br>
> tar.close()<br>
> ........<br>
><br>
> Wath is the correct sintax?<br>
><br>
><br>
> Thanks.<br>
><br>
><br>
><br>
> --<br>
> <a href="https://mail.python.org/mailman/listinfo/python-list">https://mail.python.org/mailman/listinfo/python-list</a><br>
</p>