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


ADVERTISEMENT

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

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 :: 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

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

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

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

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

Ubuntu Servers :: Live / Instant Rsync For Master Slave Setup

Feb 8, 2011

I need to perform instant filecopy between a pair of servers. Its loosely based on a master slave setup as we have ucarp floating a virtual IP between the two. services are on both boxes (tftp, apache). I'm happy with that, I now need a way to instantly sync files from set directories, as we could see problems if files have changed should the system fail over without being in sync

I know I could cron *1 but I don't want it running EVERY minute, in any case, if the change was within the last minute, then it wouldn't have the change anyway. I think it can be done with rsync daemons on box boxes, but I can't find a guide to to this. ATM the slave has been setup to accept rsync from the master, so I just need the config to have all changes on the master instantly replicated.

View 3 Replies View Related

Fedora Servers :: Rsync And SELinux: Software Not Working?

Feb 19, 2009

I am using FC 10. I did an rsync to get a software Matlab from the local lan. But Matlab does not work. The error is:

Quote:

License checkout failed.
License Manager Error -96
MATLAB is unable to connect to the license server.

[code]....

I have set SELinux as Permissive for the current enforcing mode, while the default enforcing mode is Enforced. I did rsync in this way:

Code:

rsync mecsmrao@10.16.4.32:/home/pkg/lic/matlab-7.6/ /usr/local/pkgs/matlab_7.6_r2008a/ -avtpog -e ssh

What am i supposed to do?

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

Fedora Servers :: Does Fedoraproject Close Its Official Rsync Server?

Dec 1, 2009

Does fedoraproject close its official rsync server? Or I did the wrong way?

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

Debian :: Run Rsync Without Writing To The Boot Drive?

Mar 8, 2011

I am running Debian squeeze on a Seagate Dockstar. It boots Debian from a USB flash drive, and has two 1 TB usb hard disks hooked to it. The machine is used for only rtorrent and nfs. The flash drive contains only the system software and rtorrent. All of the data that rtorrent moves around is on the usb hard disks, including downloaded data, watch folder, and session folder. About once a day I run rsync with the source being usb_1 and the target being usb_2: # time rsync --progress --stats -a --delete /media/usb_1/ /media/usb_2 Since this machine boots from a usb flash drive, I'm interested in keeping the number of writes to the flash drive to a minimum. The machine used to boot from an Adata flash drive, which has no LED. That drive wore out after about five months. Completely dead, as in gparted would fail with an I/O error on write when trying to write a new partition table to it. No big deal - I restored the software to a new flash drive using an image I had made in Clonezilla.

The new drive (a Sandisk Cruzer 4 GB) has an LED and I assume this is showing me when the drive is being accessed, read and write. When the system is at idle, the LED sort of "breathes" off and on slowly. When rtorrent is downloading or uploading, it flashes a few times and goes back to breathing.

I'm assuming that once everything has been loaded and the system has been running a while that when the LED flashes, that means that data is being written to the flash drive. (Is this a good assumption?) With just rtorrent running, there's not much flashing, maybe 10 - 20 times/minute. However when rsync is running, the LED just flashes on and off like crazy. The daily rsync run takes anywhere from three to 30 minutes, depending on how much new data was downloaded each day. But no matter how long it takes, the LED just flashes like crazy the whole time.

I'm assuming this means that all the new data from the source drive is being written temporarily to the flash drive or something like that, and this is wearing the flash drive out prematurely. Does this sound likely? If so, is there a way to get rsync not to do this and to do its thing in RAM only and not write to the boot flash drive?

View 12 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 Servers :: Rsync - How Not To Log "Links"

Apr 1, 2010

I'm running rsync and outputting the log to a file using --log-file option. I am also using the --link-dest option, which in turn is adding the hard link creation output for EVERY file in the log file. I want to ONLY show the actual file transfer (if any) that take place.In the 'log format' section of rsyncd man page here I assume you can do this, I just can't make sence about the code.

View 3 Replies View Related

Server :: Unifying Permissions Between Two Servers - CentOS - Webmin/CentOs - Cpanel - And Rsync

Jan 1, 2010

I have two servers, both running CentOS, but one running Cpanel as the control panel and the other running Webmin.

I would like to sync the web folders using rsync. However, when I sync the files from the Cpanel host the permissions look as follows:

Code:

But that doesn't work on the Webmin server which needs the following:

Code:

It seems the Cpanel install has the group as 'nobody' whilst webmin has it the same as the file owner. I can fix this by running:

Code:

But as the file transfers will be frequent, I don't want the files to be inaccessible until chown is run.

So, what I really want to know is - how can I change things on the 'webmin' server so that files with ownership owner:nobody will run?

View 1 Replies View Related

Ubuntu Servers :: Windows DHCP Server - Multiple Boot Servers ?

Apr 1, 2011

I'm curious if anybody can shed some light for me in this department. We're in a large environment with a Windows DHCP Server. We have been tinkering with LTSP on Edubuntu as thin and fat clients. It works great, but right now we just have 1 server handling the lab, which works fine unless we want to expand, which may be very possible.

These are the instructions I received:
Login to your windows server and load the DHCP configuration screen
Create a DHCP reservation for the MAC address you obtained
Add the configuration options below to enable the machine to boot from the LTSP server
017 Root Path: /opt/ltsp/i386
066 Boot Server Host Name: <ip address>
067 Bootfile Name: ltsp/arch/pxelinux.0 # Specify CPU architecture in place of 'arch', for instance 'i386'

From: [url]

I'm curious, what if I want to have multiple Ubuntu servers on the network that I want to have bootable? For example, let's say I have 3 labs, and 3 servers. Server A to Lab A, Server B to Lab B, and Server C to Lab C. I want all C's computers to boot to C, and B to B, A to A, etc.

1 - How would I add multiple entries on the Windows DHCP Server to allow all 3 (A B C) servers to boot?

2 - How would I be able to isolate the clients so ONLY Lab A clients boot to Server A, etc?

View 7 Replies View Related

Ubuntu Servers :: Boot Partitions On Both Sda And Sdb So If One Drive Fails The Second Boot Partition Will Work Away ?

Dec 6, 2010

I am building a 10.04.1LTS server. I am putting the /root filesystem into a Software RAID1 partition. I want to keeo my /boot partition outside of RAID.Is there a way to have a boot partition on both sda and sdb so if one drive fails the second boot partition will work away - or should this be kept in with RAID also.

View 6 Replies View Related

Ubuntu Servers :: Stuck At Boot With Raid (non Boot) In Fstab = Useless?

Nov 1, 2010

Forgive the terseness. I'm frazzled with this issue, perhaps I should have asked earlier. Every weekend for the past 2 months has been an endless cycle of 'repair broken system' off the install disk.

Installed from Ubuntu server 10.04LTS x86_64, + xfce-desktop Here is uname -a Linux ournas 2.6.32-25-server #45-Ubuntu SMP Sat Oct 16 20:06:58 UTC 2010 x86_64 GNU/Linux If I add my raid + lvm to the fstab file, the boot stalls, (no error it, just hangs waiting, forever). So that's a not very user friendly to start with.

I've tried the suggestions about UUID in fstab tried using LABEL instead, or even /dev/xxx. Every time it hangs. I've googled this endlessly and not found a solution. So don't ask why... since I seem to have tried every odd suggestion to fix this, I've lost track. There seems to be some consensus that whoever gave us plymouth laid an egg. Forgive me if I'm wrong, but did we need a better graphical boot if it breaks everything else?

[Code]...

View 3 Replies View Related

Ubuntu Servers :: Setup A PXE Boot Can Boot A Machine From The Network

Aug 23, 2010

I was wondering, how much hassle would it be to setup a PXE boot so I can boot a machine from the network.

View 9 Replies View Related







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