can anyone help me to backup/restore my database file by using jsp code??? im using postgres sql...

please its urgnt..tnx in adv. i am using fedora 11


i got this code from an article. but i know it will not wrk.. pls help me if any one hav any idea.

<%
File test=new File("/media/data/test00.sql");
FileWriter fw=null;


try {
            Runtime runtime = Runtime.getRuntime();
            File backupFile = new File("backup/backupScript.sql");
            fw = new FileWriter(backupFile);
            Process child = runtime.exec("pg_dump -h org.postgresql.Driver -U postgres -W EmplDir_MySQL> db.20070725.dump Password:postgres");
            InputStreamReader irs = new InputStreamReader(child.getInputStream());
            BufferedReader br = new BufferedReader(irs);

            String line;
            while( (line=br.readLine()) != null ) {
                fw.write(line + "\n");
            }
            fw.close();
            irs.close();
            br.close();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
%>

still anyone hav no idea!!!!!!!!!!!!!!!!!!!!!??????

1. Smack on hand for using JSP for such task
2. We do not live here 24/7 to answer questions
3. You may want to look on Java and Cron jobs like this

1. Smack on hand for using JSP for such task
2. We do not live here 24/7 to answer questions
3. You may want to look on Java and Cron jobs like this

i dont want any reply from big peoples lik u... i expected it frm person who willing to help to anybody..

Your ignorance cramps my conversation.

Nothing else to add...

i dont want any reply from big peoples lik u... i expected it frm person who willing to help to anybody..

And what kind of help would you want? Someone to code it for you? What didn't you like from the previous post?

It is true that we are not obligated to provide solutions immediately the moment someone posts a question. Our lives don't resolve around answering your questions. We are not under your payroll. We also have jobs with deadlines to meet

If no one has answered could mean a million things. I personally don't know how to fix what you want.

And the link provided might help you.
If you didn't understand it then ask a question about it.


PS: Peter can you check the link because I could not open it. I don't know if there is something wrong with me or the link.

commented: Well spotted, it had double "http://". Ubuntu doesn't automatically preselect content of the pop-up for URL +12

Peter said all there is to say. Even were he wrong (he isn't), after OP's vitriolic response I'd be utterly disinclined to help him.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.