Solved

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

Posted on 2004-08-22
3
254 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 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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