backups in background

Hi, how i can do background backup process in Unix??

I has Solaris Operating System.

very much thanks!!

You can either do the command and add a & sign at the end (puts the process in the background) or put your backup commands into a script and run the script via cron.

Check out the man page for crontab, ufsdump, and/or tar.

If you are not using CRON, and are using the command line, you must use the "nohup" command at the beginning of your command so that when you logout, the script won't die.

nohup <your command here> &

My brain is your brain...
:cool:

Kelam - the nohup isn't always needed. Running from the command line and backgrounding the job, you can exit without the job going away without the nohup.

Last login: Fri Aug 30 13:23:41 2002 from progserver
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
No mail.
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
medusa% sleep 600 &
[1] 10341
medusa% exit
medusa% logout
Connection to medusa closed.
medusa% ps -ef|grep sleep
tghunter 10341 1 0 13:49:16 ? 0:00 sleep 600

And on HP-UX 11.0 it lets you know about the job but if you exit anyway, it's still there (of course, root now owns it on HP - now I need to look into what other fun that can cause).

$ sleep 600 &
[1] 20884
unixops@isaac:/export/home/unixops
$ exit
You have running jobs
unixops@isaac:/export/home/unixops
$ exit
logout
Connection closed by foreign host.
unixops@isaac:/export/home/unixops
$ ps -ef|grep sleep
root 20814 1515 0 13:48:10 ? 0:00 /usr/bin/sleep 300

---------------------------------------------------
QUOTE: And on HP-UX 11.0 it lets you know about the job but if you exit anyway, it's still there (of course, root now owns it on HP - now I need to look into what other fun that can cause).

---------------------------------------------------

I am an HPUX admin and do run 11.0 and 11i, and you are correct in your assesment for a USER. However, that is not the case if you are actually running the job as ROOT.

There is no one to had the job off to in that case. So it will abend when you logout after the warning message.

I find it is good practice to use nohup in all cases just so it is always the same. You are performing the command with the same methodology all the time.

That is why I don't alias the rm -i command because it is a non-standard command. However, don't get me wrong it is perfectly okay to have aliases. I just don't do it for rm, mv, and similar commands. That is just my personal philosophy.

:slight_smile: :smiley: