Solved

Placing a copy of every file uploaded in a given directory.

Posted on 2004-08-22
3
250 Views
Last Modified: 2010-04-20
Hello.

I use Linux/Apache/PROFTP/PHP etc on my dedicated server.

I would like for a backup copy of every file added to my /home/webadmin/html/pages/ dir to autoamically be created (with a timestamp for a name) and placed in my /home/backup/ folder.

How can this be done?

Thanks!
0
Comment
Question by:hankknight
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Jase-Coder earned 500 total points
ID: 11864266
in the script that uploads the file add cp <filename> <path>

in your langauge used there will be functions that allow you to call the system functions.

I would write a shell script that copies the file to another directory and call the shell script from with in the file that uploads thefile file the user is uploading.
0
 
LVL 16

Author Comment

by:hankknight
ID: 11864548
Can this be done for files that are uploaded with FTP ?
0
 
LVL 11

Expert Comment

by:Jase-Coder
ID: 11868836
I think so, You could run the script once someone has logged in. You'll also have to make it check for new files that have been added to the directory. i.e. been uploaded
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why isnt it sending mail from my php but is from my server 10 45
Securing Azure Oracle instance of Linux VM 4 58
CENTOS DHCP Server / PXE/TFTP 14 77
number in printf 13 27
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question