Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unix script to create a backup on a remote computer Post 302647073 by Benedit on Sunday 27th of May 2012 06:36:47 AM
Old 05-27-2012
Unix script to create a backup on a remote computer

Hello, I have a problem - I attended a UNIX course a couple of years back but, unfortunately, I don't remember how to write scripts for shell commands. Now I want to make a script that makes a backup of a folder on a remote computer and I have no idea how to begin. Smilie

So the idea is that I want the script to create a series of archives of a target directory, each archive must be no larger than 2GB in size and files should be each put in only one archive (as opposed to half of the file in archive1 and the other half in archive2), do not worry there are no files bigger than 2GB Smilie . For the transfer along the net I remember something about "ssh" and generated keys - to avoid password requst every time.

I also want the script to create a text file which indicates which file is in which archive or which archive contains which files, whichever.


Thank you!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

transferring files to and from remote computer

Hi all, i first have to ssh into my university account and then through there another ssh into my office computer, from my home computer. I have been trying to transfer files to and from with no such luck. How do i send a file from home to my office computer. Do I have to send it to my... (6 Replies)
Discussion started by: yogi1
6 Replies

2. Shell Programming and Scripting

copying files from remote computer

hi, i want to copy files from a remote computer in a network to a specific directory on my PC. ( script ) Forexample , IP of the remote PC is 172.16.5.24 login:aaaa Passw:123 /folder1/file1.txt to my pc folder /fd/awa.txt kinldy help Thanks (2 Replies)
Discussion started by: krabu
2 Replies

3. Shell Programming and Scripting

copy file from script file to remote computer

hi, i want copy one or group of file from a computer to others, but i have some problem that do not allow me to do this. i do this by scp command like this : scp <file name> root@cpName:destinationAddress but the problem is that it do not it automatically. it means when it is connecting to... (4 Replies)
Discussion started by: MShirzadi
4 Replies

4. Shell Programming and Scripting

Access a remote computer using perl

Dear all, Where can i find documentation on how to access a remote computer using a perl script? I search to the internet but i can not find something straightforward to this issue. Which is the easiest way to do that? What i would like to do is to access a remote computer access a directory... (5 Replies)
Discussion started by: chriss_58
5 Replies

5. UNIX for Advanced & Expert Users

loggin remote computer as a super user.

hello all, can i loggin remote computer as a super user(i know root user/passwd) and change his access controlle list. if yes please tell me how to do it, i am new to linux. thank you. (6 Replies)
Discussion started by: zius_oram
6 Replies

6. UNIX for Advanced & Expert Users

currenlty logged in user on remote computer

Hello everyone Does anyone know, if there is a command that tells you who is logged in on remote host? I'm ssh-ing as root to the remote host and then run whoami but that doesn't tells me who is logged in that particular computer instead shows my remote login. Is there a way to do that?... (2 Replies)
Discussion started by: goude
2 Replies

7. AIX

backup script failed with error '0403-005 Cannot create the specified file'

In AIX 5.1, a daily run script that backing up oracle data failed yesterday with following errors: The Tivoli backup of DBPROD failed. What could be the issue, OS, backup or Oracle? (3 Replies)
Discussion started by: jalite19
3 Replies

8. Shell Programming and Scripting

How to create a simple shell script to backup

Hello - I am in process of deleting many files which are older than 4 weeks. For example I am inside: /subsystem/prod/ Files are with various extentions, but anything older than 4 weeks should be deleted. What would be the most simplest script to acheive this? (4 Replies)
Discussion started by: DallasT
4 Replies

9. Homework & Coursework Questions

Create a simple bash backup script of a file

This is the problem: Write a script that will make a backup of a file giving it a ‘.bak’ extension & verify that it works. I have tried a number of different scripts that haven't worked and I haven't seen anything really concise and to the point via google. For brevity's sake this is one of the... (4 Replies)
Discussion started by: demet8
4 Replies

10. Shell Programming and Scripting

Triggering remote UNIX shell script from Remote desktop

I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like ssh hostname path ksh HC_Report.ksh>out.html ...but it generates the HTML file in remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies
SHAR(1) 						    BSD General Commands Manual 						   SHAR(1)

NAME
shar -- create a shell archive of files SYNOPSIS
shar file ... DESCRIPTION
shar writes an sh(1) shell script to the standard output which will recreate the file hierarchy specified by the command line operands. Directories will be recreated and must be specified before the files they contain (the find(1) utility does this correctly). shar is normally used for distributing files by ftp(1) or mail(1). EXAMPLES
To create a shell archive of the program ls(1) and mail it to Rick: cd ls shar `find . -print` | mail -s "ls source" rick To recreate the program directory: mkdir ls cd ls ... <delete header lines and examine mailed archive> ... sh archive SEE ALSO
compress(1), mail(1), tar(1), uuencode(1) HISTORY
The shar command appeared in 4.4BSD. BUGS
shar makes no provisions for special types of files or files containing magic characters. SECURITY CONSIDERATIONS
It is easy to insert trojan horses into shar files. It is strongly recommended that all shell archive files be examined before running them through sh(1). Archives produced using this implementation of shar may be easily examined with the command: egrep -v '^[X#]' shar.file BSD
June 6, 1993 BSD
All times are GMT -4. The time now is 10:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy