Reply to Re: REQ: Backup of website

Your name:

Reply:


Posted by axlq on 05/13/07 22:27

In article <1179089807.470490.226520@p77g2000hsh.googlegroups.com>,
shimmyshack <matt.farey@gmail.com> wrote:
>what control have you got over the server. Any large backup will take
>CPU time, and memory. If you had cron access I would suggest using
>zip.
>You might be able to find out what functions are on your system, and
>use on of them to recursively zip up a website.
>
>for instance try
><?php
>$files = file_get_contents('tobezipped.txt');
>system('minizip -o -9 pdfs.zip '.$files);
>exit();
>?>
>where tobezipped.txt is a space separated list of double quoted files.

Good idea. Even better would be in that system() call:

system('nice -10 minizip -o -9 pdfs.zip '.$files);

The 'nice' command causes the task to be run in 'nice' mode at
a lower priority so that it doesn't interfere with other more
important functions being performed by the server.

Appending ' &' to the command may also force it to run in the
background so your php script doesn't have to wait for it to
complete:
system('nice -10 minizip -o -9 pdfs.zip '.$files.' &');
....but I am unsure if that will work.

-A

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация