Need help in creating file restoration script from a backup script.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help in creating file restoration script from a backup script.
# 8  
Old 12-02-2011
yes menthil might be correct but when i tested it. it was successfull.
but before this i have just created context file directory and started restoring env file.
we are not doing full clone
we are doing partial clone of APPL_TOP & COMMON_TOP

Regards
Kaleem.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Need help in creating script for disk mirror and backup

Hi, I am very new to scripting. I need to create a script which does following. Scenario: First get the format command output echo | format Insert the new disk to Solaris Server Get Zpool status format the new disk ( Here I need to select the new disk which have been inserted, I do... (1 Reply)
Discussion started by: praveensharma21
1 Replies

2. 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

3. Shell Programming and Scripting

MySQL Restoration Backup Script

Hi there, Alright I have this line that I'm working with (bash programming): mysql -u username -pHASH ${args} < /home/site/backups/site.${args}.sql I get this error on that line: ./restore.sh: line 51: syntax error near unexpected token `newline' ./restore.sh: line 51: `mysql -u... (5 Replies)
Discussion started by: Pandoula
5 Replies

4. UNIX for Dummies Questions & Answers

BackUp Home/Creating User from File

Hi! I want to test something to learn Shell scripting better. 1) How can I make a BackUp from all users and groups homedirectory? I want to save that backup in an archiv. Can I choose how to name the backUp archiv? 2) Ok I want to make a file like csv, in this file are listed Users.... (3 Replies)
Discussion started by: CommanderLinux
3 Replies

5. Solaris

question about restoration from backup tape (solaris 10)

I am trying to restore opt on my server. my issue is, all the partitions are saved into the same back up tape. what is the exact command to just restore /opt for example, supposing c0t0d0s7 is the partition for /opt ---------- Post updated at 01:16 PM ---------- Previous update was at... (7 Replies)
Discussion started by: feg
7 Replies

6. Shell Programming and Scripting

creating a parameter file in the script

Here is my code which i am using wright now: CODE #!/bin/bash awk ' BEGIN { FS="|"; while ( getline <"file1.txt" > 0) a=$2 } { if($1 in a) printf("%s %s Specialty Mapped\n", $1, a) > "mapped.txt" else printf("%s %s Specialty Not mapped\n", $1, $2) > "notmapped.txt" ... (2 Replies)
Discussion started by: dsh007
2 Replies

7. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

8. Shell Programming and Scripting

Shell Script backup a file ?

could you please find a solution for this script that backup a file. The file name to backup should be provided as input parameter, the backup file should have the same file name with the extension ".bak". If the user provides no input parameter, the script should display an error message. If... (1 Reply)
Discussion started by: anything
1 Replies

9. Solaris

creating log files for a backup script on solaris

I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)
Discussion started by: valicon
3 Replies
Login or Register to Ask a Question
DUPLY(1)							duply documentation							  DUPLY(1)

NAME
duply - a shell frontend to duplicity for simplified backups SYNOPSIS
duply profile create duply profile command [options ...] duply profile command[_command_...] [options ...] DESCRIPTION
Duply deals as a wrapper for the mighty duplicity magic. It simplifies running duplicity with cron or on command line by: - keeping recurring settings in profiles per backup job - enabling batch operations eg. backup_verify_purge - executing pre/post scripts for every command - precondition checking for flawless duplicity operation For each backup job one configuration profile must be created. The profile folder will be stored under ~/.duply/<profile> (where '~' is the current users home directory). Hint: If the folder /etc/duply exists, the profiles for the super user root will be searched and created there. USAGE
First time usage (profile creation): duply <profile> create General usage in single mode (see EXAMPLES): duply <profile> <command> [<options> ...] General usage in batch mode joining commands with '_' (see EXAMPLES): duply <profile> <command1>_<command2>[_<command3>...] [<options> ...] Non duply options are passed on to duplicity (see OPTIONS). All conf parameters can also be defined in the environment instead. PROFILE
location for profiles Indicated by a profile name i.e. sample, which is resolved to ~/.duply/sample ('~' expands to environment variable $HOME). Superuser root can place profiles under /etc/duply if the folder is manually created before running duply. ATTENTION: If /etc/duply/ is created, old profiles under /root/.duply/ have to be moved manually to the former or will cease to work. using profiles Usually only the profile name will be used: duply humbug backup Alternatively a path might be used. This might be useful for quick testing, restoring or exotic locations. Shell expansion should work as usual: duply ~/.duplytest/humbug backup ATTENTION: The path must contain at least one '/', e.g ./test instead of only test. COMMANDS
usage Get usage help text. create Creates a configuration profile. backup Backup with pre/post script execution (as batch the same as: pre_bkp_post) o as full backup if parameter full_if_older matches or no earlier backup is found. o as incremental backup in all other cases. bkp As above but without executing pre/post scripts. full Force full backup. incr Force incremental backup. pre Execute only script '<profile>/pre' (for debugging purposes). post Execute only script '<profile>/post' (for debugging purposes). list [age] List all files in backup (as it was at age, default: now). status Prints backup sets and chains currently in repository. verify List files changed since latest backup. purge [--force] Shows outdated backup archives (older than $MAX_AGE). Option --force delete these files. purge-full [--force] Shows outdated backups (more than $MAX_FULL_BACKUPS), the number of recent full backups and associated incrementals to keep. Option --force delete these files. cleanup [--force] Shows broken backup archives (e.g. after unfinished run). Option --force delete these files. restore target_path [age] Restore the backup to target_path (as it was at age). fetch src_path target_path [age] Restore single file/folder from backup (as it was at age). OPTIONS
--force Passed to duplicity (see commands: purge, purge-full, cleanup). --preview Do nothing but print out generated duplicity command lines. --disable-encryption Disable encryption (does override profile settings). PRE
/POST SCRIPTS All internal duply variables will be readable in the scripts. Some of interest might be CONFDIR, SOURCE, TARGET_URL_<PROT|HOSTPATH|USER|PASS>, GPG_<KEYS_ENC|KEY_SIGN|PW>, CMD_<PREV|NEXT> The CMD_* variables were introduced to allow different actions according to the command the scripts were attached to e.g. 'pre_bkp_post_pre_verify_post' will call the pre script two times, but with CMD_NEXT variable set to 'bkp' on the first and to 'verify' on the second run. EXAMPLES
Create profile 'humbug': duply humbug create and then edit the resulting conf file of this profile. Backup 'humbug' now: duply humbug backup List available backup sets of profile 'humbug': duply humbug status List and delete obsolete backup archives of 'humbug': duply humbug purge --force Restore latest backup of 'humbug' to /mnt/restore: duply humbug restore /mnt/restore Restore /etc/passwd of 'humbug' from 4 days ago to /root/pw: duply humbug fetch etc/passwd /root/pw 4D See man duplicity, section TIME FORMATS for the time format. A one line batch job on 'humbug' for cron execution: duply humbug backup_verify_purge --force FILES
Files in the profile folder(~/.duply/<profile>): conf .......... main profile configuration file pre ........... pre script (see above for details) post .......... post script (see above for details) gpgkey.*.asc .. exported GnuPG key file(s) exclude ....... a globbing list of included or excluded files/folders The rules for the exclude file can be found in man duplicity, section FILE SELECTION). IMPORTANT
Copy the whole profile folder after the first backup to a safe place. It contains everything needed to restore your backups. You will need it if you have to restore the backup from another system (e.g. after a system crash). Keep access to these files restricted as they contain all information (gpg data, ftp data) to access and modify your backups. Repeat this step after all configuration changes. Some configuration options are crucial for restoration. BUGS
This program is still in development. If you find bugs write a bug report on: http://sourceforge.net/projects/ftplicity/. AVAILABILITY
For newer versions see http://sourceforge.net/projects/ftplicity/. COPYRIGHT and LICENSE Copyright (C) 2006 Christiane Ruetten, 2008-2011 Edgar Soldin This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian systems, the complete text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. AUTHOR
Duply was written by Christiane Ruetten (initial version, named ftplicity) and Edgar Soldin. This manual page was written by Joachim Wiedorn <ad_debian at joonet.de> for the Debian project (and may be used by others). SEE ALSO
duplicity(1) Version 1.5.5 2011-09-06 DUPLY(1)