0
votes
2answers
45 views

Backup Ubuntu server with cron/rsync: Problems with resuming large files

I currently have a dedicated Ubuntu backup server which wakes itself up from suspend (using rtcwake) daily. 5 minutes later a cron BASH job kicks in, using rsync to pull files from various network ...
1
vote
3answers
77 views
+250

rsync changing already existing files

I have a simple line of rsync in my crontab that gets backup files from the prod server to another. It looks like it is touching the already existing files in the destination folder. This way, the ...
0
votes
2answers
33 views

rsync last 3 days plus weekly backups

I have a shell script that i'll be running with a crontab. Basically I want to modify this so I can do daily backups for the last 3 days. I've seen examples where the last 7 days are backup. I just ...
0
votes
1answer
567 views

rsync over ssh fails as cronjob works on shell - NAS4Free

This is my rsync.sh in the home directory of my backup user $ cat rsync.sh #!/bin/sh rsync -avvvz --stats --log-file="/var/log/rsync_client.log" -e "ssh -i /mnt/stor0/backup/backup-rsync-key" ...
0
votes
2answers
1k views

Host key verification failed [rsync: connection unexpectedly closed]

I have been stuck with a peculiar problem, where rsync command is not running when it is executed through crontab. Below is the code : #!/bin/sh -x ...
6
votes
8answers
1k views

make a cronjob wait for previous rsync job to finish

I'm using rsync to backup some data from one server to another. All works fine, but it might take longer to finish depending on how much data there is to transfer. Is there any gauranteed way to ...
0
votes
0answers
194 views

Automating rsync job with cron

I'm having troubles getting an rsync script to work on cron. I know this is a question that's been asked aplenty, but I've read all the answers I can find, and followed all of the instructions, but ...
1
vote
4answers
517 views

Make cron log rsync only if there was transfer

I have this crontab running every 5 minutes: date >> ~/18/rsync.log rsync -vaz user@r18:~/assets ~/18 >> ~/18/rsync.log 2>&1 It adds this to the log file every 5 minutes: Thu ...
0
votes
1answer
887 views

Elastix, how to MOVE files from one server to other server?

In my office, i have to schedule for moving a file from one computer to other computer (Both are using Elastix). My idea is using cron, scp, and rm to do this. So here are the script that i use: scp ...
1
vote
1answer
137 views

Rsync inconsistency between CLI and crontab

I want to use rsync to synchronise my home folder with a "backup" copy on another drive on an Ubuntu 11.10 machine. And I want it to happen every 15 minutes. If I manually run: rsync -ar --delete ...
2
votes
3answers
1k views

How can I automatically sync files on my CentOS VM?

I have to keep copying files over from my ~/src to /home/httpd directory, which is a pain when I'm making front end changes. Is there a way I can have changed files sync automagically? -- and ...
0
votes
1answer
407 views

RSync shell script failing to run as CRON, runs fine manually

I have a simple shell script that runs Rsync. It runs fine if I call it manually from the command line, but when I set it up as a CRON job I get the following error: rsync: failed to open exclude ...
1
vote
1answer
147 views

Rysnc Dynamic Log File Name

I am setting up rsync cron to run every hour to sync up 2 servers. My question is how do I make the log file name that it is saving to in the format log_file-{Year}-{Month}-{Date}.log with the year, ...
2
votes
3answers
316 views

Near real-time replication of Wordpress blogs

I have a wordpress blog that is currently residing on a server (VPS) in UK and I would like to set up an identical server (same specs, same OS - Ubuntu) for some sort of redundancy as well as ...
6
votes
2answers
2k views

Cron and rsync using file lock but is there a better way on Mac OS X Server?

I have this bash script and is run via cron on a regular interval: #!/bin/bash RSYNC=/usr/bin/rsync SSH=/usr/bin/ssh KEY=/Users/admin/Documents/Backup/rsync-key RUSER=philosophy RHOST=example.com ...
0
votes
1answer
675 views

Rsync when run in cron doesnt work. Rsync between Mac Os x Server and Linux Centos

I have a working rsync setup between Mac OS X Server and Linux Centos when run manually in a terminal. I enter the rsync command, it asks for the password, I enter it and off it goes, runs and ...
3
votes
3answers
2k views

Rsync failing when trying to run via cron

I am trying to set up a cron to run this command: rsync -e "ssh -i /home/ldsmp3/ssh-key -o GSSAPIAuthentication=no" -az /home/ldsmp3/public_html ...
1
vote
2answers
880 views

bash script returns “out of memory” in cron, but not in shell

I'm running a nightly bash script to sync a remote folder (source) with a local folder (target). I've tested this script, based on rsync, and it works fine in a root shell. It takes time since there ...
2
votes
1answer
3k views

Intermittent rsync over ssh errors via cron w/ Ubuntu 10.04: unexplained & protocol data stream

I have a number of rsync clients trying to connect to an rsync server routinely, and they're intermittently failing with one of a couple error messages. Either: rsync: connection unexpectedly closed ...
1
vote
3answers
1k views

Crontab + Rsync - nothing happens :(

Hello the interesting line in my crontab looks like this: (edited & saved it by running crontab -e) 23 * * * * rsync -av --delete root@example.de:/var/www/ /home/niklas >> ...
0
votes
2answers
581 views

Failover tmpfs mirroring. Am I doing it right?

My goal is to have a certain directory to be available as tmpfs. There will be some modifications during server uptime in this dir and those modifications must be synced to non-tmpfs persistent dir on ...
0
votes
1answer
241 views

How to create daily backup and hourly differentials with easy restore?

I need to create a daily full backup (snapshot) of a directory tree + hourly differentials. A developer who has only sftp access needs to be able to restore from the backups and hence a solution such ...
2
votes
1answer
59 views

Are there any scripts to synchronize sites?

I've just set up a fail-over DNS to switch the site to a second host if the first is down. This is great for showing an old / archived version of the site, but I suspect maintenance is going to be a ...
3
votes
1answer
469 views

Running rsync script from cron…not recognizing --max-size parameter

This is a tricky one: I have a cron job that runs a script with lots of rsync commands in it. For some reason after I added the --max-size=2G parameter to each rsync command the job errors out with ...
9
votes
5answers
8k views

Execute rsync command over ssh with an ssh agent via crontab

i have a cronjob: 0 9 * * * rsync -a mydir remote_machine: i installed this with 'crontab -e'. i have an ssh-agent running, and when i execute the rsync command itself it works w/o any user ...