Ubuntu Servers :: Advanced Rsync - Make The Rsync Set Or Keep The User And Group Affiliations?

Nov 17, 2010

Thought I'd post it here because it's more server related than desktop... I have a script that does:

[Code]....

This is used to sync my local development snapshot with the live web server. There has to be a more compact way of doing this? Can I combine some of the rsyncs? Can I make the rsync set or keep the user and group affiliations? Can I exclude .* yet include .htaccess?

View 6 Replies


ADVERTISEMENT

Ubuntu :: Can't Rsync Gmail / Run Rsync --recursive --times --perms --links --delete?

Jan 7, 2011

When I run rsync --recursive --times --perms --links --delete --exclude-from='Documents/exclude.txt' ./ /media/myusb/

where Documents/exclude.txt is

- /Downloads/
- /Desktop/books/

the files in those directories are still copied onto my USB.

And...

I used fetchmail to download all my gmail emails. When I run rsync -ar --exclude-from='/home/xtheunknown0/Documents/exclude.txt' ./ /media/myusb/ I get the first image at url.

View 9 Replies View Related

Server :: Rsync Execution - With Crontab - Have Given Full Path To Rsync Too

Apr 12, 2011

I have a tiny shell script to rsync files between two servers and remove the source files.

This script works fine, when it has been initiated manually or even when the rsync command is executed on the command line.

But the same script doesn't work, when I try to automate it through crontab.

I am using 'abc' user to execute this rsync, instead of root, as root login to servers are restricted in all of our servers, by us.

As I mentioned earlier, manual execution works like charm!

When this rsync.sh is initiated through crontab, it runs the first command(chown abc.abc ...) perfectly without any issues. But the second line is not at all executed, and there is no log entry i can find at /mnt/xyz/folder/rsync.log.

View 6 Replies View Related

Software :: Run Rsync To Download Files From A Server Without Rsync Daemon?

Sep 18, 2009

I just tried to sync files from one server to another. After the sync process, I found the files are bigger than original ones.

I looked up the web and found someone mentions the rsync daemon. So I have to run the daemon on one server before I run the rsync?

The command I used is rsync --partial --progress -r source destination

View 1 Replies View Related

Server :: Rsync Can Not Rsync Files With Include Filter

Jul 21, 2010

use rsync to cp such files and dirs under /var/www/html/mydir directory but these two files(/dir4/1.html /dir4/2.html) cant rsync to dest mechine.

rsync configure file,below...

View 2 Replies View Related

Server :: Rsync Fails In Cron - Ssh Key - For Rsync?

Dec 8, 2010

I'm using Ubuntu 10.04 LTS server and Postgresql 8.4. I have a .sh script that is run by cron every other hour. That works fine. The .sh script includes an rsync command that copies a postgresql dump .tar file to a remote archive location via ssh. That fails when run by cron; I think because it is (quietly) asking for the remote user's password (and not getting it). I set up the public/private ssh key arrangement. The script succeeds when run manually as the same user that the cron job uses, and does not ask for the password. I am able to ssh to the remote server from the source server (using the same username) and not get the password prompt (both directions), so why doesn't rsync work? I even put a .pgpass file in the root of that user's directory with that user's password, and the user/password are identical on both servers.

I think the problem is rsync is not able to use the ssh key correctly. I tried adding this to my script but it didn't help.

Code:

Here is the rsync command embedding in the .sh script.

Code:

Here is the cron entry:

Code:

View 6 Replies View Related

Server :: Rsync Using Www As User Gives Ssh Error - User Www Not Allowed Because Account Locked

Feb 11, 2011

Apache is run as www as is all the files/folders. People are uploading via FTP, scp, so the problem is if I chmod so everyone can read, then rsync as a user it works until new files are added which then my ; if rsync fails with a permission denied. Now I can add a chmod in the script so everyone can read, but since www can already read, I figured I would just change my script to use www. I added the ssh key to his authorized_keys file, but when I try to just ssh in I see this in the secure file;

server sshd[29539]: User www not allowed because account is locked
sshd[29539]: Failed none for invalid user www from ip port 54983 ssh2

Now I read a few places already saying I need to add a password to the account, etc. but before I jump and try all I read, 1st major one, will this now break apache? Will this affect any startup things, etc. and .... will that unlock that user for ssh in or is there another preferred method?

View 6 Replies View Related

Ubuntu :: How To Make Rsync Command Open In Terminal

Sep 14, 2010

I have the following rsync command for making some backups:
Code:
rsync -r --progress --delete -H --numeric-ids -a --exclude=.gvfs /source /media/Backup
If I paste that in my Terminal, it will perform a backup of all the files and show me what's going on in the Terminal window. But how can I make that into a launcher? I have made a launcher on my desktop with that code in its Properties, but double-clicking it starts the rsync process (I can see HDD activity) but a Terminal window won't open.

View 6 Replies View Related

General :: Make Rsync To Use Relative Path?

Sep 6, 2011

I want to sync remote database copy using command

As it's result command creates file /backup/snapshots/backup/databases/mysql.sql. How can I force it to put file in /backup/snapshots/mysql.sql? It's mandatory that source must be remote (it's part of more complex script).

View 1 Replies View Related

Debian Configuration :: Can Make Openvpn Faster Like Rsync

Oct 22, 2010

I use openvpn to connect otherwise isolated machines, and use samba to share filesystems across the vpn, which works just fine.But I recently discovered that copying files using rsync -e ssh is so much faster than copying from a mounted filesystem - like about 5 times faster.I've got comp-lzo enabled in both server and the client, at least I think I have, the directive is there in both the server.conf and the client.conf files, but how do I check that it's active?Does anyone know if I can make openvpn behave more like rsync, because copying is easier than rsyncing?

View 8 Replies View Related

General :: Windows - Make Rsync Case Insensitive

Mar 12, 2011

I'm rsync'ing a bunch of files between a Windows and a Linux system. Since not all Windows care about case, some of the files on the Windows system no longer have the same casing as they had on the Linux system. But rsync now treats these files as different and uploads a new copy.

Is it possible to have rsync ignore the case?

View 3 Replies View Related

General :: Make Rsync Ignore Directory Structure?

Apr 19, 2011

Is there a way to force rsync to not make directories in its destination directory; ie, to simply dump all of the files from the source directory directly into the destination without copying any of the folders that the files were originally in? I tried --no-dirs, but that seems to only be for empty directories.

View 1 Replies View Related

Ubuntu Servers :: Cron Will Not Run Rsync Job

Mar 30, 2011

I am running a headless Ubuntu server accessed through Webmin. The server is running 10.4.2 64 bit version. I have a number of cron jobs including a simple back-up job which is:
Code:
rsync -av /media/server/ /media/backup/backup/
All of the other jobs run fine but for some reason this job which is scheduled to run each day at midnight does not run. If I SSH into the server and run the job manually it works fine.

The output of 'crontab -l' is:
@daily rsync -av /media/server/ /media/backup/backup/
11 3 * * * /etc/webmin/package-updates/update.pl
@daily tar czf /media/backup/serversystem.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/media --exclude=/sys /
@reboot inadyn --username ********** --password ********** --update_period_sec 600 --alias **********
@daily /etc/webmin/backup-config/backup.pl 12978522112842

The output of 'crontab -e' is:
Error opening terminal: unknown.
crontab: "/usr/bin/sensible-editor" exited with status 1

View 9 Replies View Related

Server :: Rsync Between Two Different Servers

Dec 8, 2010

I have two servers. #1 is the main server and #2 is only used in case the first one is down. Both of them are in the same LAN. Both are debian Lenny configured the same way. For instance, if #1 has a problem, I simply disconnect it, set #1's IPs to #2 and I have my system ready. The only matter here is that there are plenty of files that need to be syncronized between #1 and #2. I thought that rsync was the answer to this problem I have.

I wanted to create a bash script that runs every day (with cron) and syncs the files I need (.conf, and other data). I used ssh-keygen to generate a pair of keys in order to login SSH without a password. The problem is that the permitRootLogin is set to yes in my sshd_config in both servers. So I can't log in directly as root by ssh. But I need to log in as root to be able to rsync the files between the servers because some of them are .conf files and aren't accesible for non-privilege users (Only root).

View 7 Replies View Related

OpenSUSE :: Download With Rsync All Packages And Make Local Repo?

Nov 28, 2010

in home I do not have internet connection, but in work I have internet connection, in home I install Fedora 14 for my 6 years old daughter and she use it for play games like supertux and openarena and .So I want install opensuse for my daughter and I want test it. for fedora , I download all packages with rsync in work and move them to home by USN flash and then I make localrepo in home and install all packages , I need , I want do this for OpenSUSE , all of us know DVD , does not has all packages , I need , so I have to download all packages and make localrepo in home and install all packages , I need , Can I do this for OpenSuse or not ,I want download all packages need by OpenSuse by rsysc and make loacl repo, How I can do this for Opensuse ?

View 9 Replies View Related

General :: Rsync Command Inserting User Home Directory?

Apr 7, 2011

Why would rsync insert a user's home directory path in variable expansion when run via cron, but not when run manually. The gory details... Red Hat Enterprise Linux AS release 4 (Nahant Update 6) Linux 2.6.9-67.0.20.ELsmp The script (parts anyway, and simplified)...

Quote:

#!/bin/bash
. /home/bea/.bash_profile
echo rsyncloc=${rsyncloc} >> ${log}

[code]....

View 4 Replies View Related

Ubuntu Servers :: Rsync Script On Boot?

Sep 13, 2010

We are looking to centralize some code in a scalable environment. So some servers may do other jobs, etc. doing other things, but the key element is when the server is booted, I want it to rsync some config files, scripts, etc. local to the box and I am having an issue as things are a bit different from an RHE server.

I have a test entry in the rc.local a simple touch testfile, then after that a restore.sh file. I reboot the box, wait a minute then login. I see hte testfile timestamp updated yet the rsync doesn't fire. I can then manually run it and it works fine, but I need to have this go on boot.

View 2 Replies View Related

Ubuntu Servers :: RSYNC With Archive Backup

Sep 15, 2010

I have a Linux host acting as an ISCSI server for a Windows box. I want to keep an off site backup, so I figure rsync will keep the ISCSI server synced with an offsite Linux host. I understand that Rsync does block level incremental transfer to conserve bandwidth ok, awesome.The trick is, that I also want an archival copy kept. Say I want to go back to a revision of a file from 10 days ago, I need to be able to do that.

I was planning on using Backup Exec, since we currently have a licensed copy. Throw the archives from Backup Exec onto the ISCSI server as well, and have it keep a rotating 30 day backup, or something like that. The issue I see here is that this will be creating a deleting files as it does its daily backup rotation. I'm guessing RSYNC will see these as new files, and likely retransmit everything on a daily basis. The question then becomes, is this assumption correct, or will it still know to do a block level incremental transfer even when file names and such are changing?

View 5 Replies View Related

Ubuntu Servers :: Any Way To Encrypt Backup Using Rsync

Feb 4, 2011

I support a small business which has an Ubuntu server running as a file server. The server is running Ubuntu 10.4. There is one hard drive which is mounted as /media/hdd. Each night this is backed up to an external USB hard drive mounted as /media/backup. The backup is carried out using the command:

Code:
rsync -av /media/hdd/ /media/backup/

Is there a way to encrypt this back-up so that if the USB hard drive is plugged into another machine it cannot be read?

View 5 Replies View Related

Server :: Rsync Files Between Web Servers?

May 20, 2010

I've 15 web servers (in private network) running RHEL, Apache. Needs to sync web files between them. each server is accessible to each other via public key (with passphares).

1) Main server is web1 (where dev upload files initially). So I can make all other servers accessible by web1 without password/passphares and run rsync periodically to update files between them. But security is an issue here as all servers will become easily accessible.

2) Run rsync daemon in all other servers (except web1) on designated port and run rsync command from web1 to sync files. This will do the work but running daemon in all servers might increase overhead and making sure that daemon is running all the time etc. are my concern for this implementation.

View 8 Replies View Related

General :: Rsync On Windows To Make It Keep Special Characters In File-names

Sep 2, 2010

We're in the process of implementing an offsite backup of all our servers to a remote Linux server. We're using rsync over ssh.What I've found is that characters such as ±, ¶,´ and £ are replaced on the Linux server with underscores.I don't mind if it changes these characters in the filenames of documents, but when it renames a language pack from Espa±ol.clx to Espa_ol.clx, it could cause issues for us further down the line.

What do I need to do differently to make the special characters copy over correctly? For the initial sync which will take place locally, before the machine is moved offsite, I have SAMBA enabled. I am able to copy files from Windows to the Samba share, retaining the original filename, though it looks different in the Linux directory listing, i.e. t̻st becomes ĻstThese files get deleted by rsync when it runs, as it does not match the filenames.

View 1 Replies View Related

General :: Best Script To Have Rsync Make Image File Of Hard Drive

May 9, 2011

I have never used rsync before, only DD. But from what I have been reading, rsync is better becasue it will basically mirror your hard drive, thus being able to run the cloned software from the new hard drive. My problem is I do not know what is the best commands or even the basic commands to use in rsync. I am trying to make an image from a external hard drive to a usb drive. That way my chances of messing up he original software is not as risky becasue I'll just restore the image onto another hard drive. Does anyone know the best script to have rsync make an image file of a hard drive and place it on a usb drive and then restore it?

View 8 Replies View Related

Ubuntu Servers :: Rsync - Backup Only Changed Blocks?

Aug 10, 2010

I'm going to make a nightly backup copy from one server to another, using rsync. If I have a sufficiently large file, say 4+ GB or so, I'm not interested in copying the whole file if only a small change has been made. Can rsync detect small changes on block level and backup only those if needed?

View 2 Replies View Related

Ubuntu Servers :: Remove Directory Structure With Rsync

Apr 6, 2011

I have several copies of a file set with different organizational structures, but the same files. i.e.
On client1 files can be found in ~foobarfile1, ~foobarfile2, ~foo-avernfile3, ~foo avernfile4
On client2 files can be found in ~foo-barfile1, ~foo-barfile2, ~foo-tavernfile5, ~foo avernfile6
On client3 files can be found in ~file1, ~file3, ~file5, ~file7

I have access to one client and the server where I'd like all the files to be synced. I'm not worried about conflicts, just having a complete copy of all files[1-7]. Is there a way to cause RSYNC to remove the directory structure, so that I get something like:
client1% rsync files server:backup
client2% rsync files server:backup
etc
where at the destination all files will be checked against the destination set regardless of the source directory structure?

View 4 Replies View Related

Ubuntu Servers :: Rsync To Username / Password FTP Server

Jul 26, 2011

Im reading a lot on how to rync to an ftp server but none of the steps are telling me how to do it on servers that use normal authentication.Example I want to keep /var/www in sync with a folder on an ftp server in a folder called /cdn/.Id like to see all files and folders in sync, not just a compressed file etc

View 2 Replies View Related

Fedora Servers :: Syncing The Servers With Rsync?

Apr 2, 2009

I setup an rsync in cron to sync a master server with a backup server. however not everything gets copied over or removed. I believe this to be a permissions issue on the backup server. I am using a user we created specifically for this, and the rsync is setup to preserve permissions and delete files that have been deleted on the master..

Here is the rsync command:

59 11,23 * * * rsync -avP --delete -e "ssh -pPort" /media/_Files user@ip address:/media >> /home/user/sync.log

Of course the ip address, user and port number is something else then above.. Is there a way to make the user that is initiating the sync into a superuser like root? That way everything on the backup server can be updated as necessary? I don't want to use root, Id like it to be a name I can keep relatively confidential.

View 3 Replies View Related

Ubuntu Servers :: Rsync Windows Client Folder To Server

Mar 27, 2010

i have an ubuntu server 4 windows client..i use putty or webmin. would like to copy some folders for example: "My houses"to be backup everynigth to the ubuntu server..can somebody give me an easy way for doing this with rsync and smb or cifs.

View 4 Replies View Related

Ubuntu Servers :: Rsync: Recv_generator: Failed To Stat (to The File Name...)

Apr 4, 2010

I've just noticed a small problem I am having with my company file server. When making backups to an external NTFS drive weekly I have noticed that the file names with thai characters are not getting backed up. I receive the below error:

rsync: recv_generator: failed to stat (to the file name...)
Invalid or incomplete multibyte or wide character (84)

There are thousands of files on the server that contain thai characters in there names so how do I get around this problem so it will back up all files and not just the English character ones. I read somewhere that each file would need to be converted to a different character set but this would take years as there are so many files.

View 1 Replies View Related

Ubuntu Servers :: Rsync Auto Login And Schedule Backup?

Nov 11, 2010

I have setup Rsync as a daemon on a Ubuntu 10.04 box and the setup was successful. Here are my configs

Code:
root@hurricane:`# nano /etc/default/rsync
# defaults file for rsync daemon mode
# start rsync in daemon mode from init.d script?
# only allowed values are "true", "false", and "inetd"

[Code].....

View 6 Replies View Related

Ubuntu Servers :: Rsync Backup - Transfer Files With Appropriate Permissions

Dec 4, 2010

I wrote a script to wake up my windows machine and do an rsync backup of some of my files. I wanted to make this command a accessible through local bin so I made it executable. However the problem is that when I copies files is copies them with root permissions and i can edit or delete them. How can I set the files so they transfer with the proper permissions for my Ubuntu user?

Code:
#!/bin/bash
# Description: This script first wakes up the client machine and syncs the appropriate folders.
# Finally the script shuts down the client if it was off to begin with.
if [ "$(whoami)" != "root" ]; then
echo "Permission Denied"
exit 1
fi .....

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved