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


ADVERTISEMENT

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

Ubuntu :: Rsync - .sh And Crontab

Feb 14, 2011

I'm currently trying to have crontab to automatically backup files from ramdisk. It works perfectly when I run it myself by simply cd:ing to scripts directory and type ./save_world.sh.

The problem is, that crontab DOES (at least it looks like it) run that command every one minute. /var/log/syslog does show it executing that line every one minute without any errors. I'm currently very confused what I did wrong here. I have tried rebooting, fiddling with crontab line, tried sudo crontab -e but nothing seems to work.

My script is called save_world.sh and it is located in /home/phoe/minecraft/rpg/

Code:

My crontab -e has one line and it is following:

Code:

I haven't determined any specific time yet, because I'm just trying to get it work first.

Snippet from /var/log/syslog:

Code:

View 4 Replies View Related

General :: Rsync, Crontab And Backing Up Files?

Apr 11, 2011

This is a quick one, I don't have any problems yet, I just want to check that this is going to do what I think it is. I added the line

Code:
00 01 * * * rsync -avz --delete /local-storage /mnt/usbackup
to my crontab file, am I to understand that this will backup /local-storage to my external

[code]...

View 4 Replies View Related

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 View Related

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

General :: Rsync Directories By Path / Filename Only?

Aug 22, 2010

Is there a way for me to rsync two directories comparing only filenames (and not file size, date modified, or any other criteria)?

View 2 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

General :: Full System Clone Snapshot Using Rsync?

Dec 11, 2010

I have automated backups running on my ubuntu box using rsnapshot (rsync) basically following this tutorial. My concern is how to restore if everything is lost. Since it does not seem that I can backup the entire drive and that I have to choose individual folders and some like proc/ cause problems.

Currently in my rsnapshot.conf I have (see below). Is there a way to just clone the entire drive? Or should I not do this? Questions:

1, Can I backup in a way such that it is a clone of the drive so that it can be swapped with the current drive?

2, If not yes to clone, If I had a total drive failure would I install a basic ubuntu and then replace all the files with the backups?

3, Anything I might not know about that I should.

[Code]...

View 1 Replies View Related

Ubuntu :: Rsync And Full-disk Backups - Failure Takes Too Long

Mar 20, 2010

I've been using dump/restore for backups, for quite some time. It's worked fine, but the process of recovering from a HD failure takes too long. What with eSATA and external drive docks, what I'd really like is to use rsync to maintain a current clone of my entire system drive. That is, start with a full disk clone, and then use rsync to keep it current.

I've seen plenty of instructions on how to do this with a directory tree, but I've seen none for doing it with a copy of the entire disk. If, for example, I copy /etc/fdisk, then the copied disk would have entries with the same UUIDs as the original disk. Which would mean that if the clone disk were to be bootable, its partitions would need the same UUIDs as the original disk. Which they would be, if the cloned disk started as a full-disk clone, I think. Am I wrong? But that means that when the clone disk was active, I'd have partitions with duplicated UUIDs. Is this going to cause problems? When I boot, will I get the correct partitions loaded?

View 4 Replies View Related

Server :: Used The Command Crontab To Load The Table But Didn't See Any Execution Of The Script?

Jan 27, 2010

I created a file which in I tried both :

Code:
MAILTO=""
* * * * * /var/www/scripts/script.php >> /dev/null

[code]....

View 5 Replies View Related

OpenSUSE Install :: Mirroring Repositories With Rsync: Module Opensuse-full Is Broken?

Dec 1, 2010

The rsync module "opensuse-full" which worked well so far seems currently broken. It tries to mirror a huge number of additional stuff (factory?) but fails with "permission denied". Any place where I could report this?Command:

Code:
rsync -rlpt -hi -stats rsync.opensuse.org::opensuse-full /drive/repo
Errors:

[code]....

View 5 Replies View Related

General :: Rsync Incremental Backups Rather Than Full Backups?

Nov 12, 2009

How do you get Rsync to do incremental backups rather than full backups? At the moment I have a script that will create a backup folder (if it doesnt already exist) then copy the source files into the backup directory with the command

rsync $VERBOSE --exclude=$TARGET/ $EXCLUDE --exclude '/Ls-wtgl1c8/**' -rt --delete $source/ $TARGET/$source/ >> $LOG_FILE

Target is where the files will be backed up to Sources is the dir(s) to be backed up Exclude files is the list of files not to backup
log file is where the output will be saved to. At the moment it only does full backups, but I would only like to do incremental, how would this be achieved? Am I missing out an option in the Rsync that is required.

View 9 Replies View Related

Server :: IO Error When Trying To Rsync

Mar 31, 2010

I attempted today to Rsync data from 'serverold' to 'servernew' and also delete data on 'servernew' that has been deleted / removed from 'serverold'. When I run the Rsync command I get the following error:

[Code]...

rsync warning: some files vanished before they could be transferred (code 24) at main.c(1042) [sender=3.0.7] why this is not working? Is my command syntax wrong or missing switches? I read the 'Man' page and gathered this would be the correct command but I could be wrong.

View 1 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

Server :: Sync File Server Data Into Backup Server Machine By Command- Rsync -avu?

Jun 21, 2011

iam trying to sync file server data into backup server machine by command- rsync -avu path/of/data ipaddress-of-backup-server:/path/where/to/save after running it ask for root password and manually it is successful.but i want to make it automatic.for that i also tried cronjob and also generated authentication key but iam not successful in login automatically..anybody know how to authenticate root to login for storing data in backup server.

View 14 Replies View Related

Debian :: Backup Server With Rsync And Ssh

Jan 18, 2016

I switched last summer from Windows (used it since Windows 95) to Debian. I'm using Debian Jessie for a couple of months now and I'm getting used a little.

There are problems here and there, but I can solved them with some reading on the web. Not really a big problem...till now

I run Debian 8.2 om my PC (PC1). Bought an older PC (PC2) that I want to use as a backup server.

I'm using PC2 only for making backups, after the backup I switch it off again.

So I installed Debian 8.2 (net-install without DE and with SSH) on PC2 and tried to configure it to let it work as my backup location. Made a public SSH key and exported it to the root account (no problem) and to the user account (sensdeb), but there was an error "Access Denied"

Gave the user (sensdeb) sudo-rights via visudo file

# User privilege specification
root ALL=(ALL:ALL) ALL
sensdeb ALL=(ALL:ALL) ALL

I installed rsync.

The problem is that Rsync only works when I use the root account.

Code: Select allrsync -r -n -t -v --progress --delete -u -l -H -s /media/Data/Mp3/Anastacia root@192.168.1.102:/test/Mp3

When I try to sync with he normal user account sensdeb

Code: Select allrsync -r -n -t -v --progress --delete -u -l -H -s /media/Data/Mp3/Anastacia sensdeb@192.168.1.102:/test/Mp3

I get error's. Access Denied

I don know how to give the user sensdeb the rights so that I can use that account for my backup tasks. Now it's possible to sync with the root account, but that should not be the way to do it, I read many times.

View 7 Replies View Related

Ubuntu :: Rsync Backup Server

Jul 20, 2010

This should be a quick one. I'm trying to backup a single directory and it's subdirectories on my Lucid Server to a freenas box across my network. This is what I'm using to do that rsync -r -a -v -z * --delete freenas: DSIBackups..It almost works perfectly except for one problem. When a file is deleted at the source, this command doesn't seem to delete it on the receiving end. I assumed that the --delete would do that but aparently not.

View 1 Replies View Related

General :: Rsync Server Over SSH On Fedora 12

Feb 26, 2010

I'm trying to set up my trusty Fedora box, with rsync over ssh to backup my windows machines at home and I need help configuring the rsync server (I'm using DeltaCopy as the rsync client on the windows side)I tried a few dry runs but it seems windows can't see the linux box, the rsync job just hangs for ever and never does anything.I should mention that ssh works fine.

View 3 Replies View Related

General :: Setup Server Using Rsync

Mar 5, 2010

How I use rsync to setup server from any existing server, that I want to create server from my existing one server where I have installed and tune everything, I want everything replecate on new server excluding network (IP) and /proc

View 2 Replies View Related

Server :: Keeps One Month Data - Rsync?

Jul 19, 2011

My rsync takes backup of everything from the differenct linux servers to my backup device which is 2 TB only .Since it takes almost full backup of source , it consumes space lot in the backupdevice. So i wanted to keep all my backup files of one month old latest files in backup device, it should remove all files more than one month data.

View 2 Replies View Related

Server :: Limit Rsync Log Output?

Jul 23, 2010

Is there a way to limit the amount of data that goes in to an rysnc log. The problem I have is that I email myself the log file to make sure it went ok but sometime the log is hugeHere is what I am doing with rsyncrsync -azHK --delete-after /home/ /mnt/usbbackup/home/ >/backup-log/backup.txt

View 1 Replies View Related

Server :: Use Rsync Authorized By LDAP?

Jul 15, 2011

I try use Rsync authorized by LDAP, but seem as this way is not available. Is that true?

View 2 Replies View Related

Server :: Ubuntu 9.10 - Setting Up Rsync?

Feb 18, 2010

I'm trying to set up rsync on a clean install of ubuntu server 9.10, with ubuntu-desktop installed.

In the end, I'd liek the 2 windows clients (running Vista and Win7) to syncronise with the server when they log on/off. I'd also like them to access a printer attached to the server.

View 5 Replies View Related

Server :: Using Rsync For Incremental Backups?

Jan 29, 2010

Can I use rsync for incremental backups of the running linux server?

View 5 Replies View Related

Server :: Using Rsync With Cron On Different Port?

Nov 14, 2010

I'm trying to set-up a cron job that uses rsync to transfer back files from a remote server. ssh on the remote server is running on port 12345 but this seems to be a problem. My script looks like this:

Code:
#!/bin/sh
RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
KEY=/home/username/.ssh/id_rsa.pub

[Code]...

View 6 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

Server :: Rsync Files And Directories From A RedHat Host To A Windows Server 2003R2?

Jun 9, 2011

I'm trying to rsync files and directories from a RedHat linux host(v 4.5 & 4.7) to a Windows server 2003R2 Standard Edition with cygwin running. I'm executing the rsync command from the cygwin shell. The transfer involves rsync'ing approximately 1 TB of data from the linux server to the windows server. After about 280+GB of data transfer, the transfer just dies.

There seems to be no particular file or directory that the transfer stops at. I'm able to rsync GB's of data from other linux hosts to this cygwin server with no problem. Files and directories rsync fine.The network infrastructure is essentially the same regardless of the server being rsync'ed in that it is GB Ethernet running through Cisco GB switches. There appear to be no glitches or hiccups across the network path.

I've asked the folks at rsync.samba.org if they know of any problems or issues. Their response has been neutral in that if the version of rsync that cygwin has ported is within standards then there is no rsync reason this problem should happen.I've asked the cygwin support site if they know of any issues and they have yet to reply. So, my question is whether the version of rsync that is ported to cygwin is standard. If so, is there any reason cygwin & rsync keep failing like this?

I've asked the local rsync on linux guru's and they can't see any reason this should fail from a linux perspective. Apparently I am our company cygwin knowledge base by default.

View 3 Replies View Related







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