Script for Automatic Backup System


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for Automatic Backup System
# 1  
Old 01-30-2012
Script for Automatic Backup System

Hi Guys/ULF,

Good day! Can anyone help me on how to create a program which will be used for our backup process and that will run automatically say every 30th day of the Month. Below is the given command to perform a backup process among all nodes/servers within the same cluster.
Code:
ns cluster "ns management backup" all partition 1

This command will be executed only on the dedicated centralized server which has a capability the same backup process on other servers within same cluster. Upon running this command, this will perform the backup by asking the User whether to proceed with the backup or not. Here is a sample output below:
Code:
nssh# ns cluster "ns management backup" all partition 1
Command was launched from partition 1.


------------------------------------------------
Executing command in server server1

Remote user: <user>
Remote password: <password>
Remote directory: <backup directory>
Remote server: <IP Addr>

Start backup? (no/yes) yes

Create backup file...
Transfer backup file...
  Interactive mode off.


------------------------------------------------
Executing command in server server2

Remote user: <user>
Remote password: <password>
Remote directory: <backup directory>
Remote server: <IP Addr>

Start backup? (no/yes) yes

Create backup file...
Transfer backup file...
  Interactive mode off.


Note: Text in RED color are user input.

Appreciate any input from you guys Smilie
Thanks and God bless!


Best Regards,
rymnd_12345

---------- Post updated at 08:04 AM ---------- Previous update was at 07:03 AM ----------

Guys,

The main problem in creating this program is that, How can I do it without having the user type the word "yes" as if the script behaves like automatic and gives response "yes" once the prompt has seen, (eg. using expect, but I don't have an idea on how to integrate it on shell or perl script.) Please help Smilie


Br,
rymnd_12345
# 2  
Old 01-31-2012
Hi Guys,

Any update so far? Appreciate any suggestions from you. I just would like to have this for me to automate our backup procedure. How to import the word "yes" whenever the command for backup process already runs and prompting the user for confirmation. Please advise. Smilie


Br,
rymnd_12345
# 3  
Old 01-31-2012
You may get away with this (depends how and when the application reads from the terminal):
Code:
yes yes | command

See "man yes".
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Cloning a system via mksysb backup from one system and restore to new system

Hello All, I am trying to clone an entire AIX virtual machine to a new virtual machine including all partitions and OS.Can anyone help me on the procedure to follow? I am not really sure on how it can be done.Thanks in advance. Please use CODE tags for sample input, sample output, and for code... (4 Replies)
Discussion started by: gull05
4 Replies

2. HP-UX

System not responding and Automatic process kill

Hi All, One of our servers stopped responding , unable to take any logins into it, the response is almost nil...later it resumed Also during this time one of our application processes which was costly on memory got killed..is it an OOM kill? Would like to know to know how to avoid such... (4 Replies)
Discussion started by: baanprog
4 Replies

3. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

4. Shell Programming and Scripting

Not correct processing of “\ “ in names of dirs inside shell script (tar command - system backup scr

Hello, Recently, I've started with shell scripting, and decided to write a script for my system backup using tar. When I was dealing with tar execution inside shell script I found this, inside shell we have the following code: tar $TAR_PARAMS $ARCHIVE_FILE $EXCLUDE $BACKUP_STARTwith... (6 Replies)
Discussion started by: ilnar
6 Replies

5. Solaris

Automatic backup through DD and crontab

Hi, I have not been working with Solaris for more than 10 years ago. Many things and details have ben forgotten. Hopes that some could help me with the problem. We used this scripts (below) for daily backup. The problems is following: I want to backup all partions/slice on a specific... (4 Replies)
Discussion started by: gjh
4 Replies

6. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

7. Shell Programming and Scripting

Email script when automatic backup is finsihed

Hello all, i'm still new to this site and thought i might find some help here :). lately i performed a script to make an automatic backup of some files in certain directories. the script looks something like this: #! /bin/bash ##############VARIABLES path=/export/home/cassi/Backup... (5 Replies)
Discussion started by: Wizard_1979
5 Replies

8. Linux

full system backup script

Please help. I am new to linux. I wrote a script to run the backup on lunix machine but the job gave me an error. I am using Linux 2.6.14.3. Below is the sample of my script can anyone tell me where went wrong? Thanks in advance. #!/bin/sh dat=$(date +%d%b%y)... (5 Replies)
Discussion started by: clement
5 Replies

9. HP-UX

Automatic system recovery?

Hi all! I've a strange problem. I would use the GNU Make tool on HPUX 11.11. To archive this, i have compiled the sourcecode and renamed HP make in /usr/bin from make to make_old. Now i have make a softlink from /usr/local/bin/make (GNU version) to /usr/bin/make. All things here are ok, but... (1 Reply)
Discussion started by: coredump2003
1 Replies
Login or Register to Ask a Question