• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

(Help) Creating Automatic Server Back Ups

Joined
Jun 7, 2009
Messages
543
Reaction score
222
I've been trying to create a .sh script to create automatic back ups on the server database via pwAdmin. Unfortunately the way that I tried doesn't work for me. I was wondering does anyone know of a viable solution to creating automatic back ups.

This is what I used to attempt to create an autmatic back up using pwAdmin
Code:
#!/bin/sh

wget http://127.0.0.1:8443/pwAdmin/index.jsp?page=serverctrl&process=backup
rm *jsp*

I then added the .sh file to crontab to run everyday at midnight server time. I know that it is problematic to run a back up while a server is running as I read in another post that it will have inconsistent data and the best way to do it is while the server is offline.

Could the reason it is not working be because I am using index.jsp to run the back up instead of serverctrl.jsp? Would the script work if I change it to:

Code:
#!/bin/sh

wget http://127.0.0.1:8443/pwAdmin/serverctrl.jsp?process=backup
rm *jsp*

Edit: Just tested this and this doesn't work either.
 
Last edited:
Joined
Apr 11, 2010
Messages
931
Reaction score
407
Why are you trying to backup though pwAdmin? Just make a script that zips up your database and appends a time stamp to it. Then run that through cron. If you need to restore the database at any point just unzip one of the archives over the broken database. pwAdmin probably does a similar thing but I haven't looked at it.
 
Upvote 0
Junior Spellweaver
Joined
Apr 9, 2012
Messages
120
Reaction score
36
I've been trying to create a .sh script to create automatic back ups on the server database via pwAdmin. Unfortunately the way that I tried doesn't work for me. I was wondering does anyone know of a viable solution to creating automatic back ups.

This is what I used to attempt to create an autmatic back up using pwAdmin
Code:
#!/bin/sh

wget http://127.0.0.1:8443/pwAdmin/index.jsp?page=serverctrl&process=backup
rm *jsp*

I then added the .sh file to crontab to run everyday at midnight server time. I know that it is problematic to run a back up while a server is running as I read in another post that it will have inconsistent data and the best way to do it is while the server is offline.

Could the reason it is not working be because I am using index.jsp to run the back up instead of serverctrl.jsp? Would the script work if I change it to:

Code:
#!/bin/sh

wget http://127.0.0.1:8443/pwAdmin/serverctrl.jsp?process=backup
rm *jsp*

Edit: Just tested this and this doesn't work either.

have a try or domain/:8443/pwAdmin/serverctrl.jsp?process=backup
and check your port is open
 
Upvote 0
Back
Top