Sponsored Content
Full Discussion: Bash Script Restore help
Homework and Emergencies Homework & Coursework Questions Bash Script Restore help Post 302626093 by paperghost on Wednesday 18th of April 2012 11:28:46 PM
Old 04-19-2012
Bash Script Restore help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
Attempting to make a auto restore script i have one made for backing up cron and installed programs just need to do it back the other way.






3. The attempts at a solution (include all code and scripts):

Code:
#!/bin/bash

echo "This script will atempt to restore a server back to a previos state"\
echo "This is written to be excuted from server 20"
echo -n "Please enter the server number";
read  $server        
echo -n "Please enter the user name";
read  $user
echo -n "Please enter the date you wish to restore to in this format 2012-04-13-Friday";
read $date
echo -n "location of installed apps ie /storage/backups/$date/$server/$user/backup/installed/installed-software";
read $locationinstalled
echo -n "Location of cronjobs file ie /storage/backups/$date/$server/$user/backup/cron/cronjobs";
read $locationcron
        
rsync -av -e ssh  $user@$server.exmaple.net:/$locationinstalled/ /home/$user/
rsync -av -e ssh  $user@$server.example.net:/$locationcron/ /home/$user/
    
ssh $user@$server.example.net 
    crontab -l < cronjobs
    cat installed-software | sudo dpkg --set-selections && sudo apt-get dselect-upgrade
echo "WE HAVE DONE IT YAY!"



#End script

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Restore Script

Hope I have posted this in the correct forum. I'm trying to recover some Oracle files from tape to setup an offsite recovery system. These files are nightly backdumps tar to tape. I have recovered rootvg and vg01 from the weekends full backup, now to restore these nightly files I discovered I... (1 Reply)
Discussion started by: Chrisp
1 Replies

2. Shell Programming and Scripting

not showing restore information while run script

Hello, I have the following script to restore file and grep information. However, once it restore file, it showing a lot useless information and different to check which file have the statement "John price $200". Can I not show any information while running script. It only show..when found the... (1 Reply)
Discussion started by: happyv
1 Replies

3. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

4. Shell Programming and Scripting

Help with rsync file restore script

Hello Friends, I am trying to create an rsync file restore script. I will post want I have below and explain the problem I am having. #!/bin/bash # # Partial Rsync File Restore Script # # clear echo # Shell loads into /raid0/data/backup/bin/ cd .. # I cd to the backup... (1 Reply)
Discussion started by: jdavis_33
1 Replies

5. Shell Programming and Scripting

RecycleBin Script Restore

this is complete.. (2 Replies)
Discussion started by: zinn
2 Replies

6. Shell Programming and Scripting

RecycleBin Script Restore

Hi there I am making a recycle bin script in linux that consists of three scripts delete, trash and restore. The problem is with my restore script, it is using a Paths text file to store file locations when it is deleted, so that if the user restores a file out of the trash bin (recyclebin) the... (8 Replies)
Discussion started by: zinn
8 Replies

7. Shell Programming and Scripting

Delete/Restore Script

Hi there is anyone able to show me two scripts for a delete and a restore command. Delete - move a file to a dustibin directory that i have created. check to see if that file exsits first in the dustbin if so delete the file before moving the new one. Restore - return the file to its... (1 Reply)
Discussion started by: arsenal1994
1 Replies

8. Shell Programming and Scripting

Help Writing File Restore Script

Hi all, I have been tasked with creating a script that sends a file into a created "recycling" directory and another script that restores a "deleted" file. I have already created the removal script but am stuck on the restoring part. I need to restore the file to its original location by... (0 Replies)
Discussion started by: bashbeginner
0 Replies

9. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
asadmin-delete-profiler(1AS)					   User Commands				      asadmin-delete-profiler(1AS)

NAME
asadmin-delete-profiler, delete-profiler - deletes the profiler element SYNOPSIS
delete-profiler --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] Deletes the profiler element. A server instance is tied to a particular profiler by the profiler element in the Java configuration. Chang- ing a profiler requires you to restart the server. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. Example 1: Using delete-profiler asadmin> delete-profiler --user admin --passwordfile passwords.txt --host localhost --port 4848 Deleted Profiler Where: profiler is the deleted profile element. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-profiler(1AS), asadmin-list-profiler(1AS) J2EE 1.4 SDK March 2004 asadmin-delete-profiler(1AS)
All times are GMT -4. The time now is 11:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy