Sponsored Content
Top Forums Shell Programming and Scripting Requesting full back up scripts Post 302380260 by EAGL€ on Monday 14th of December 2009 04:43:51 PM
Old 12-14-2009
Mate you can get much more help from people here as long as you describe your needs very well, there are too many experts here (im just ordinary shell scripter!).

I have worked with some backup issues last months, let me give you some idea with some codes i wrote for production backup processes.

you can compress directories, files and move them from one path to another:

Code:
#!/bin/bash
DATE=`date +%Y%m%d%H%M`
cd /directory_that_you_want_to_copy
cp -r application /put_ur_path_here/backup$DATE
cd /put_ur_path_here
tar -cvfX backup$DATE.tar

you can specify some types of files before you send, move them :

Code:
find . \( -name "*.gz" -o -name "*.tar" -o -name "*.rar" \)

or you can even choose files which "modified earlier than 9 days" adding mtime and redirect them to another directory:

Code:
find . \( -name "*.gz" -o -name "*.tar" -o -name "*.sh" \) -mtime -9

you can FTP the compressed files or do many things, its up to you, Besides you can schedule the backup scripts using Cron job. Keep searching in this forum, you will find many things usefull.

Regards

Last edited by EAGL€; 12-14-2009 at 05:54 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing scripts in back ground

Hi, Test1.ksh #! /bin/ksh for i in $* do #echo "$i" ksh test2.ksh $i & done test2.ksh #! /bin/ksh sleep 5s echo "From Test 1 ==> $1" exit 0; I am executing as follows: ksh test1.ksh a b c (10 Replies)
Discussion started by: risshanth
10 Replies

2. Solaris

Back up scripts

Hi Everyone, I would like to write a Back-up script for huge files and 3 day old file. I think i need to use Tar command for it. But I am not sure how this can be done. Can someone please assist me on this. (4 Replies)
Discussion started by: gehlnar
4 Replies

3. AIX

Help with back ground scripts...

I have a user that runs a menu driven application, is there a way to see what scripts this application is executing in the back ground? OS=AIX 4.3 (1 Reply)
Discussion started by: mangolinux
1 Replies

4. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

5. UNIX for Dummies Questions & Answers

Shell Scripts - Show all directories with full information ( and no files)

Hello all, i'm stumped.... I need to list all directories with all there info and exclude the files, then vice versa. I am not sure if I need to string several ls commands together or how to even do that. I believe I need to do some variation of ls -l but need to figure out how to take out the... (5 Replies)
Discussion started by: citizencro
5 Replies

6. Shell Programming and Scripting

Problem in Concatination of string in bash scripts containing back slashes.

My script is as follows: #!/bin/bash STR1="test" echo $STR1 STR2="/bldtmp/"$STR1 echo $STR2 STR3=$STR2'/tmp' echo $STR3 output i am geting ---------------- test /bldtmp/test /tmptmp/test but my need is: ------------------ test /bldtmp/test (1 Reply)
Discussion started by: dchoudhury
1 Replies

7. Shell Programming and Scripting

how to get the scripts full dir path

lyang0@lyang0-OptiPlex-755:~$ ./test.sh . lyang0@lyang0-OptiPlex-755:~$ cat test.sh #!/bin/bash echo `dirname $0` lyang0@lyang0-OptiPlex-755:~$ pwd /home/lyang0 it doesn't get "/home/lyang0" and only when run /home/lyang0/test.sh it will get, but how can I do, then it can get the real... (8 Replies)
Discussion started by: yanglei_fage
8 Replies

8. Shell Programming and Scripting

Perl scripts: requesting for logic explanation

Hi, balajesuri and durden_tyler, I have found your perl script for the thread https://www.unix.com/shell-programming-scripting/176370-perl-script-help-me-extracting-string.html, but find it difficult to understand the syntax. Could you or any forum members kindly shed some light on the logic... (3 Replies)
Discussion started by: royalibrahim
3 Replies

9. UNIX and Linux Applications

Deja-dup make my / full. So I cannot restore my back up

The problematic directory is the following: /root/.cache/deja-dup This directory grows until my "/" is full and then the restoring activity fails. I already tried to create a symbolic link with origin another partition where I have more space. However during the restoring activity ... (4 Replies)
Discussion started by: puertas12
4 Replies

10. What is on Your Mind?

The C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer

Retro Games has announced that the C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer fan, available December 2019. See also: CNN: Iconic 80s computer The Commodore 64 to return with fully-functional keyboard YouTube: The C64 | Trailer ... (2 Replies)
Discussion started by: Neo
2 Replies
idevicebackup2(1)					      General Commands Manual						 idevicebackup2(1)

NAME
idevicebackup2 - Create or restore backups for devices running iOS 4 or later. SYNOPSIS
idevicebackup2 [OPTIONS] CMD [CMDOPTIONS] DIRECTORY DESCRIPTION
Create or restore backup from the current or specified directory. OPTIONS
-u, --udid UDID target specific device by its 40-digit device UDID. -s, --source UDID use backup data from device specified by UDID. -i, --interactive request passwords interactively on the command line. -d, --debug enable communication debugging. -h, --help prints usage information. COMMANDS
backup create backup for the device. restore restore last backup to the device. --system restore system files, too. --reboot reboot the system when done. --copy create a copy of backup folder before restoring. --settings restore device settings from the backup. --remove remove items which are not being restored. --password PWD supply the password of the source backup. info show details about last completed backup of device. list list files of last completed backup in CSV format. encryption on|off [PWD] enable or disable backup encryption. changepw [OLD NEW] change backup password on target device. AUTHORS
Martin Szulecki Nikias Bassen SEE ALSO
idevicebackup(1) idevicebackup2(1)
All times are GMT -4. The time now is 06:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy