For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > September 2005 > save an account









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author save an account
Bruno

2005-09-29, 3:55 am

Hi there,

I want to save / zip a web account from it's root via a php script.

Sorry for asking - because I have a very low internet link on my vacation
place and I have found out, that some hackers try tor "erase" some files now
and then. Changing password did not lead to a success so far.

So, if YOU have a URL or a script which COPIES or ZIPs all files including
subdirectories, you would really help me.

Thanks
Bruno


Tyrone Slothrop

2005-09-29, 6:56 pm

On Thu, 29 Sep 2005 08:46:29 +0200, "Bruno" <bruno_storz@gmx.de>
wrote:

>Hi there,
>
>I want to save / zip a web account from it's root via a php script.
>
>Sorry for asking - because I have a very low internet link on my vacation
>place and I have found out, that some hackers try tor "erase" some files now
>and then. Changing password did not lead to a success so far.
>
>So, if YOU have a URL or a script which COPIES or ZIPs all files including
>subdirectories, you would really help me.
>
>Thanks
>Bruno


Bruno:

There is nothing much to backing up a directory. I am assuming that
you are on a Linux server.

$dir = "/path/to/dir2backup";
$filename = "backup";
$date = date ('Y-m-d');
bu_dir = "/path/to/backup/dir";

chdir ($bu_dir);
if (is_dir ($dir))
{
system ("tar -zcf $filename.$date.tar.gz $dir");
system ("chmod 666 $filename.$date.tar.gz");
}



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com