LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-26-2006, 12:46 AM   #1
atripathy86
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Rep: Reputation: 0
Need to build a file manager


I take automated tape backups. I have written scripts which load tapes and take automatic full and incremental backups. I am storing the recursive listing of the tar command into index files. I need a web based client which can read those index files and generate some kind of a listing of those files. I can only read from the LOGS NOT FROM A REAL DISK

The index files are like this
a file named usr010 has contents like
usr010/
usr010/lost+found
usr010/ada
usr010/ada/abc
.
.
.

i have many other files which have a recursive listing of the file system I am backing up !!!

Can u give me any idea how to code it in PHP or is their any ready made software avaliable for this !!!

Aalap
 
Old 06-26-2006, 09:36 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Without knowing more about what you want to see, all I can suggest is to copy or soft-link them to files in your web server's document root, and view them directly. OTOH, if it was me, I would shove them into a relational database, either postgresql or mysql, which allows for very generalized querying of the database, even ad hoc queries. Doing this, you will develop a good sense of the kinds of data you consistantly wish to see, and develop routines to extract these data and format them suitably for display. I do this kind of thing with my server's log files.

--- rod.
 
Old 06-27-2006, 01:05 AM   #3
atripathy86
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thank u for ur reply

I am already using Apache + PHP. I am only stuck as to how exactly should i parse the logs. I dont want to move to SQL. I can parse the index files using shell scripts only (i am comfortable with it) I am only stuck trying to build the interface. Can u direct me to some other forum.
the reason i asked here is that, there are so many file managers avaliable for Linux. can I tweak any one of them so that they work on my Index files instead of an existing file system. I only want a web based interface. And when u click on a icon (or a folder say) it should backup that file to a location (that script i have ready - i only need to put them together !!!)
 
Old 06-27-2006, 01:11 AM   #4
atripathy86
LQ Newbie
 
Registered: Jun 2006
Posts: 4

Original Poster
Rep: Reputation: 0
My problem is how do u think i shud code this
say my first line has the root. next line has the contents of that folder. so i want that when the user clicks on one, he should be able to move to the next folder and all the way down till he reaches a file. when he clicks on that, it should load the correct tape and copy the file (this script i have ready ) i just want it to run when someone clicks it !! I am pretty new to php programming
 
Old 06-27-2006, 11:44 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It's very hard to determine exactly what you are asking. Your statements 'I am only stuck as to how exactly should i parse the logs' and 'am only stuck trying to build the interface' address two different issues.

Your shell scripts to parse the files should be fairly simple to translate to PHP. Parsing files is often made simpler and/or better by using regular expressions, so if you aren't already comfortable with those, now might be a good time to bone up on them.

Do you know how to generate pages containing HTML forms? Do you understand the mechanics of a form handler?

If the answer to either of these is 'no', then you should do some research and study, until you understand those two key concepts.

If 'yes', then I suggest that you break the problem down into the two separate issues of navigating within the universe of your directory & file index, and selecting/deselecting and accumulating the list of files/directories to backup. The latter is where forms are going to come into play.

If this helps you look at the problem with more clarity, then start writing a bit of code, and come back here when you have more specific questions.

Hope this helps.

--- rod.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
build latest network-manager schurt Ubuntu 1 08-28-2006 03:49 AM
build rpm file . bruse Linux - Newbie 4 09-11-2005 10:06 AM
How to build a rpm file from the source file? Flamenco Mandriva 5 12-22-2004 03:40 AM
[Gentoo file manager] Install RPM from the file manager? Coume Linux - Software 2 12-10-2003 02:21 AM
guide me how to build a bandwidth manager gaurahul Linux - Software 2 09-06-2003 06:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration