Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-22
3
Medium Priority
?
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Jase-Coder earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

670 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