09-18-2006
Hi, this script looks pretty cool, but I am after something to recursively PUT files, rather than to recursively GET them. I have not had a close look at the script yet, but expect it to be pretty complex to understand.
I have just purchased a nas device for backup purposes. it has a ftp server, and I would like to send all the files from my small linux server up to it for backup. I cannot use tar to make a large file and send up one file only because there is a 4 gig file limit on the nas device.
I realise that some time has passed since the script was posted, but I hope someone can help.
Thanks in advance, Robert
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to write a recursive FTP script and have come to a point where I need to test if the file is either a normal ascii file or a directory. My question is how do I test if the file is either ascii or directory. (1 Reply)
Discussion started by: aslamg
1 Replies
2. UNIX for Dummies Questions & Answers
I run the following command in some of my folders... and ended up with a huge mess!!
find . -type f -exec perl -e 's/blabla/zzzxxxx/gi' -p -i.bak {} \;
I had to kill the process and later when I checked with one of my folders..
ls
vaditerm.dt.bak
vaditerm.dt.bak.bak... (2 Replies)
Discussion started by: sskb
2 Replies
3. Shell Programming and Scripting
Problem:
It will not advance to the next user in the list. It always dies right after it sends the 2/2 files from the first users dir.
$USERLIST="/export/home/mxdooley/perl_ftp/userlist";
$USER_DIR="/export/home/mxdooley/perl_ftp/homes";... (2 Replies)
Discussion started by: Optimus_P
2 Replies
4. Shell Programming and Scripting
I wrote a shell script (AIX) to extract the file "/rep1/toto" from all the hosts referred in a list and send them to one local directory named ~/$host-$file with the hostname as prefix
rcp -p user@host:/rep1/$file ~/$host-$file
where file = toto ==> it works !
I would do the same thing... (6 Replies)
Discussion started by: Nicol
6 Replies
5. UNIX for Advanced & Expert Users
In the ls command, -t option and -R option dont work simultaneously.
ls -t ---> lists the files with sorting based on file date
ls -R ---> lists the files recursively.
How to make utilize both in the same command.?
I want to sort the recursive files listing.. (1 Reply)
Discussion started by: fermisoft
1 Replies
6. Cybersecurity
Hello,
I need to transfer files from Serve1 to Server2. Previously I was using scp command. Now I have to use sftp (due to audit issues). The problem with sftp is (atleast to my level of knowledge) we cannot transfer dirs (and files within that dir).
Is there a way to solve this? Looks like... (1 Reply)
Discussion started by: MohanTJ
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice?
thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies
8. UNIX for Dummies Questions & Answers
Is there anyway that I can change permissions on a directory and all its sub-directories and files using one single "chmod" command?? (5 Replies)
Discussion started by: the_red_dove
5 Replies
9. UNIX for Dummies Questions & Answers
Could someone help me in recursive search and ftp'ing the files to remote server?
The host machine will have
/dir1/dira/list_of_files1
/dir1/dirb/list_of_files2
/dir1/dirc/list_of_files3
.
.
.
so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies
10. OS X (Apple)
before posting, I have tried to find my answer elsewhere. no luck.
I need to find a file buried in a folder somewhere.
Master folder has 10 sub folders.
each sub folder has folders too.
I found this but it does nothing
I am on Mac and use Applescript.
do shell script "find... (2 Replies)
Discussion started by: sbrady
2 Replies
LEARN ABOUT REDHAT
smbtar
SMBTAR(1) SMBTAR(1)
NAME
smbtar - shell script for backing up SMB/CIFS shares directly to UNIX tape drives
SYNOPSIS
smbtar -s server [ -p password ] [ -x services ] [ -X ] [ -d directory ] [ -u user ] [ -t tape ] [ -t tape ] [ -b blocksize ] [ -N
filename ] [ -i ] [ -r ] [ -l loglevel ] [ -v ] filenames
DESCRIPTION
This tool is part of the Samba suite.
smbtar is a very small shell script on top of smbclient(1) which dumps SMB shares directly to tape.
OPTIONS
-s server
The SMB/CIFS server that the share resides upon.
-x service
The share name on the server to connect to. The default is "backup".
-X Exclude mode. Exclude filenames... from tar create or restore.
-d directory
Change to initial directory before restoring / backing up files.
-v Verbose mode.
-p password
The password to use to access a share. Default: none
-u user
The user id to connect as. Default: UNIX login name.
-t tape
Tape device. May be regular file or tape device. Default: $TAPE environmental variable; if not set, a file called tar.out .
-b blocksize
Blocking factor. Defaults to 20. See tar(1) for a fuller explanation.
-N filename
Backup only files newer than filename. Could be used (for example) on a log file to implement incremental backups.
-i Incremental mode; tar files are only backed up if they have the archive bit set. The archive bit is reset after each file is read.
-r Restore. Files are restored to the share from the tar file.
-l log level
Log (debug) level. Corresponds to the -d flag of smbclient(1) .
ENVIRONMENT VARIABLES
The $TAPE variable specifies the default tape device to write to. May be overridden with the -t option.
BUGS
The smbtar script has different options from ordinary tar and tar called from smbclient.
CAVEATS
Sites that are more careful about security may not like the way the script handles PC passwords. Backup and restore work on entire shares,
should work on file lists. smbtar works best with GNU tar and may not work well with other versions.
DIAGNOSTICS
See the DIAGNOSTICS section for the smbclient(1)
command.
VERSION
This man page is correct for version 2.2 of the Samba suite.
SEE ALSO
smbd(8) smbclient(1) smb.conf(5)
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
Ricky Poulten <URL:mailto:poultenr@logica.co.uk> wrote the tar extension and this man page. The smbtar script was heavily rewritten and
improved by Martin Kraemer <URL:mailto:Martin.Kraemer@mch.sni.de>. Many thanks to everyone who suggested extensions, improvements, bug
fixes, etc. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 release by Jeremy Allison. The conver-
sion to DocBook for Samba 2.2 was done by Gerald Carter.
19 November 2002 SMBTAR(1)