Koozali.org: home of the SME Server

create a service

romnet

create a service
« on: September 28, 2006, 07:20:12 AM »
I need help to autostart a backup software.
It is a new bundled software with HP USB backup device.
The path = /usr/local/hp/dpx/dpadmin

/Tony

Offline mmccarn

  • *
  • 2,656
  • +10/-0
create a service
« Reply #1 on: September 29, 2006, 02:59:15 PM »
First, you need to have a script that will run and backup everything you want backed up with no user input.

Then, use "cron" to schedule the script to run at the desired interval.

You could schedule a daily backup in either of the following ways:

1. use "crontab -e" to edit the cron schedule for "root", and insert a line something like this:
5 0 * * * /usr/local/hp/dpx/dpdaily >> /var/log/dpdaily.log 2>&1
(use "man 5 crontab" to get more info on crontab syntax)

2. Put a link to your unattended script (or just put the script itself) in the folder /etc/cron.daily

If your script generates any console output, it will be emailed to the local root account when the script is run.  If you don't want this to happen, you have to redirect all script output, including error messages ("2>&1") to a log file.

There is also a "cron.weekly" folder, so you could make two scripts - one in "cron.weekly" that does an unattended full backup, and another in "cron.daily" that does an unattended incremental or differential backup.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: create a service
« Reply #2 on: September 30, 2006, 01:09:38 AM »
Quote from: "romnet"
I need help to autostart a backup software.
It is a new bundled software with HP USB backup device.
The path = /usr/local/hp/dpx/dpadmin

/Tony


I don't use this software but is dpadmin your application user interface ?
Quote from: "HP Manual"
Linux
To start Data Protector Express on a Linux machine, open a terminal window. Then access the directory
where you installed Data Protector Express. Type ./ dpadmin. For example:
[/usr/local/hp/dpx]# ./ dpadmin
To launch the CUI, type ./ dpadmin -c. For example:
[/usr/local/hp/dpx]# ./ dpadmin -c


Maybe look to see if the installer put something in

Code: [Select]
/etc/rc.d/init.d
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
create a service
« Reply #3 on: September 30, 2006, 01:16:13 AM »
Little bit more from the manual...

Quote from: "HP Manual"
Linux and the Data Protector Express Daemon
On Linux platforms, the Data Protector Express service, or daemon, is designed to run automatically each
time the system is restarted.

248 Data Protector Express® User’s Guide and Technical Reference

The daemon program (dplinsvc) is located in the Data Protector Express directory. To access the
service in the default installation directory you would type cd /usr/local/hp/dpx/dplinsvc
and press Enter.
If you have disabled this automatic startup of the service, you can use one of the following commands to
manage the service:
Install service: Type ./dplinsvc -i and press Enter to start the Data Protector Express service
automatically when your computer starts up. Your selection takes effect the next time your computer
starts up.
Uninstall service: Type ./dplinsvc -r and press Enter to not start the Data Protector Express service
automatically when your computer starts up. In this case, your scheduled backup jobs may not run. Your
selection takes effect the next time your computer starts up.
To start or stop the service if it is already installed, use one of the following commands to manage the
service:
Start service: Type ./dplinsvc -s and press Enter to start the Data Protector Express service.
Stop service: Type ./dplinsvc -x and press Enter to stop the Data Protector Express service.
Regards,
William

IF I give advise.. It's only if it was me....

romnet

Re: create a service
« Reply #4 on: September 30, 2006, 10:36:24 AM »
Quote from: "william_syd"
Quote from: "romnet"
I need help to autostart a backup software.
It is a new bundled software with HP USB backup device.
The path = /usr/local/hp/dpx/dpadmin

/Tony


I don't use this software but is dpadmin your application user interface ?
Quote from: "HP Manual"
Linux
To start Data Protector Express on a Linux machine, open a terminal window. Then access the directory
where you installed Data Protector Express. Type ./ dpadmin. For example:
[/usr/local/hp/dpx]# ./ dpadmin
To launch the CUI, type ./ dpadmin -c. For example:
[/usr/local/hp/dpx]# ./ dpadmin -c


Maybe look to see if the installer put something in

Code: [Select]
/etc/rc.d/init.d


Thanks I will try this ans maybe put ste script i rc.local
The service itself is installed but it will not start automatic, but with this I think it will.. /Tony