Location: PHPKode > projects > WebMachinek > WMinst-0.62/backup.php
<?php
$dbase = "nova";

$conn = pg_connect("dbname=$dbase user=mypostgres port=5432");
pg_exec($conn,"COPY category TO '/tmp/category.sql' USING DELIMITERS '|';");
pg_exec($conn,"COPY page TO '/tmp/page.sql' USING DELIMITERS '|'; ");
pg_exec($conn,"COPY page_descr TO '/tmp/page_descr.sql' USING DELIMITERS '|'; ");
pg_exec($conn,"COPY page_layout TO '/tmp/page_layout.sql' USING DELIMITERS '|'; ");
pg_close($conn);

$general = "/home/apache/htdocs/public";
$internal = "/home/apache/htdocs/private";

exec ("./backup.sh $general $internal");
#exec ("tar cvzf WmBackup.tar.gz file.sql .sys .img");
#chdir ($internal);
#exec ("tar rvzf $general/WmBackup.tar.gz .repos");

echo ("BACKUP FILE IS AT: $general/WmBackup.tar.gz");
php?>
Return current item: WebMachinek