LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-08-2010, 08:59 PM   #1
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Rep: Reputation: 18
RSYNC Creates New Folder Every Time (on remote server).


I am using SSH and Rsync as a backup system. I just want to try copying the contents of one folder to one on a remote server. What happens is that rsync recreates the directory AND changes the permissions on that remote directory.

This is the command:

Code:
rsync -av -e "ssh -i ~/my_secret_key" /home/billg/videos/ steveb@192.168.1.50:/home/steve/backup/video.bak
The permissions on the remote dir change from this:
Code:
drwxr-xr-x steve steve 4096 2010-09-09 15:13 video.bak
To this:

Code:
drwxrwxrwx steve steve 4096 2010-09-09 15:13 video.bak
not good. Why does this happen?

I have a trailing slash on the source directory.
 
Old 09-09-2010, 06:48 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Try it with this:
Code:
rsync -av -e "ssh -i ~/my_secret_key" /home/billg/videos/ steveb@192.168.1.50:/home/steve/backup/video.bak/
Note the trailing "/" at the end. I think that's your problem. Without the final slash, rsync will copy the directory in its entirety. With the trailing slash, it will copy the contents of the directory but won't recreate the directory.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync connecting to a remote server Rudy Linux - Software 8 08-28-2009 12:09 PM
Time out with rsync - server, hosting or other problem?? eulaersi Linux - Networking 1 05-07-2009 06:48 AM
rsync local web folder to remote web folder? Almost working... Ultrus Linux - General 2 03-25-2009 02:49 PM
rsync not delete non existing files on remote server proNick Linux - Software 2 09-10-2008 03:47 AM
backing up remote folder with rsync and ssh ohcarol Linux - Software 6 01-03-2005 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration