Solved

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

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now