Sponsored Content
Homework and Emergencies Homework & Coursework Questions Help with Backup Shell Script Post 302508697 by kjmpa26 on Monday 28th of March 2011 06:51:31 PM
Old 03-28-2011
Help with Backup Shell Script

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:

Create a script that will backup all important system files every Friday night and send an email to the administrator stating if the backup was successful or not.


2. Relevant commands, code, scripts, algorithms:

if/then statement
cp /home /ect /usr /local /opt /var /root /boot
cron job or at command
mail -s 'subject'

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

Commands listed above but I have not put them all together until I'm sure that I have all the correct commands.

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

Devry University, Decatur, GA, USA, Professor:Bogoevski, Netw240/ACC_A


Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with a backup shell script

I'm having an issue with a problem A problem with this backup script is that if you backup the same file twice, you may get a warning message because you're overwriting an existing file. You could suppress the warning message, but a better solution is to save a series of backups distinguished by... (1 Reply)
Discussion started by: Dingosatemypant
1 Replies

2. Shell Programming and Scripting

Need help with a backup shell script

am writing my very first shell script and need some assistance. What I need help on is three things in particular. 1) Do I need to use the sleep function after the tar command or does the script know to wait until tar finishes to move on to the next line? 2) Did I populate the variable DATE... (4 Replies)
Discussion started by: rhm54
4 Replies

3. Shell Programming and Scripting

Help with backup shell script

Hello all, I am trying to backup my system database and root filesystem on remote server that is mounted on my system using tar command. For the database, i use (cd /database; tar cvf file.tar .) for the Root filesystem, i use (cd /; tar uEvf file.tar .) both are to be backup on the same... (1 Reply)
Discussion started by: Omoniyi
1 Replies

4. Shell Programming and Scripting

Help with backup shell script

Hello, Need help with a script to backup a configuration file BSD Save the file / Firewall / ConfigFiles to a remote ftp server here is the script # / bin / sh Date = $ (date +% d-% Y-% m-H-M) tar-cvf ConfigFiles.tar / Firewall / ConfigFiles ConfigFiles.tar mv / Firewall-$... (11 Replies)
Discussion started by: telouet
11 Replies

5. Shell Programming and Scripting

shell script to backup

Q: script to daily backup all databases in the server, retain only last 4 backps please anyone give me a reply (3 Replies)
Discussion started by: pssooraj72
3 Replies

6. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

7. Shell Programming and Scripting

Help with Backup Shell Script

i need to print the first date of the previous month in 20130101 format. i use the below script month_year=$(date +'%m%Y' | awk '!--$1{$1=12;$2--}') m=${month_year% *} y=$month_year##* } d=$(cal $m $y | paste -s - | awk '{print $NF}') firstdate=${printf '02d01%s' $y $m) echo $firstdate ... (1 Reply)
Discussion started by: vino1989
1 Replies

8. Shell Programming and Scripting

Help with Backup Shell Script

Hello guys. I am a Brazilian, I use a linux machine, to access it using the program Putty. I own a GTA Multiplayer, I have a folder on my server named accounts, there is the account of all players. Each player has their own file, the files are saved as follows: PlayerName.ini I would... (4 Replies)
Discussion started by: JimCarrey
4 Replies

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

10. Shell Programming and Scripting

Help with Backup Shell Script

Dear friends, I need your help. I need to create a bash script which can loop through $source_dir once a month, and find the backup of the last day of a given month for each of the 2 file types, as can be seen below. Assume that source_dir="/backup/daily" Assume that... (1 Reply)
Discussion started by: joemb
1 Replies
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)
All times are GMT -4. The time now is 09:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy