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


ADVERTISEMENT

Ubuntu :: Rsync --delete Doesn't Delete Superflous Files

Sep 25, 2010

I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:

Quote:

rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back

The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.

(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)

View 2 Replies View Related

Software :: Rsync: Backups And Hard Links?

Jul 13, 2011

I am using rsync for incremental backups. I am backing up to a second hard drive on my computer. When I check the individual backup directories (backup.0 through backup.4) with du -hs they each show 12G; when I check the parent directory squeeze it shows 15G. Over 4 backups I have added 3G. I haven't made very much for changes to directories I'm backing up and am using hard links. I have included some info below.

Quote:

Backup script:

#!/bin/bash
mount /mnt/backup
cd /mnt/backup/squeeze/
rm -rf backup.7

[code]....

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

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

General :: Rsync --link-dest Not Creating Hard Links On External Usb Drive?

Aug 24, 2009

CentOS 5.2 64bit 2.6.18-92.el5xen. Use rsync with --link-dest for nightly backups, works well. Was recently asked to start weekly backups to an external drive for off-site storage. The regular syncing works but hard linking seems to be ignored. So the backup is long with no space saving advantage. Here is an example of the command being run:

rsync --stats -axzvl --numeric-ids --delete --link-dest=/mnt/DISASTERBACKUPS/austinBackups/backups/2009-08-21 /AUSTINBACKUPS/backups/2009-08-24 /mnt/DISASTERBACKUPS/austinBackups/backups/

View 4 Replies View Related

Ubuntu :: Rsync Delete With Confirmation?

Feb 22, 2011

I want to synchronize sets of files (e.g. from or to flash memory). rsync is powerful, but --delete option is dangerous. Anyone know whether there's a way to do --delete interactively, i.e. get rsync or some near equivalent to ask (y/n, in a console window) before deleting?

View 9 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 Deletes Files It Should Not Delete

May 4, 2011

I built a script that downloads my podcasts using Gpodder into the directory /HOME/SHARED/PODCASTS/ (with a subdirectory for each podcast)The script then selects the latest episode and copies it over to a target directory (it empies the target directory first and copies over everything) I want to use RSYNC to make sure the 'not so fresh' episodes get deleted and the "fresh" episodes get copied over. Then dropbox can sync the "new" files over to the cloud where i can access them via my ipad/iphone (whole other story).The thing is : i've replaced the cp command with the RSYNC command and now the script is acting strangely.

It selects and sync's over the "newest" podcasts to the destination directory. Then it suddenly DELETES all the episodes in the destination directory and copies over the three last files.

View 8 Replies View Related

Software :: Rsync Delete Not Working

Apr 6, 2011

I would like to use rsync to keep the hard drive in my media server synced with my video collection on my linux server. The media server I believe is running some version of linux running samba. I mount the media servers share to a folder on my linux server & use the following command: rsync -a -vv --delete /home/shared/Videos/* /mnt/WDLive/Shearer Files/Movies/

However, it does not delete files on the media server that I delete on the source. I also created a new folder on the source & moved some of the files into it. When I ran rsync again, it created the new folder on the media server, but it recopied all the files from the source again, instead of moving the files which were already on the media server into the new folder, so no I have 2 copies.

View 2 Replies View Related

Ubuntu :: Sync Script - Delete Option In Rsync?

Jul 18, 2010

wrote a script to sync my netbook music with my server music and everything was fine.but if for some reason lets say i run it accidently and i'm not connected to my network, i just wiped my netbook music .here's what i got so far:

Code:
Sudo mkdir /media/ServerMusic/
mount -t cifs -o user=Justin,password=****** //192.168.1.108/Public-3/Music/ /media/ServerMusic/[code]....

i need to have the --delete option in rsync (say i sync it and realize i hate some music, when i delete it from the server i don't want it still on the netbook.i want an if statement in here somehow, but i'm not sure how to do it.something like, the first command in the script should be a ping test, if ping doesn't work end the script, if ping does work continue or if the server music gets mounted to the created directory continue, if the mount failed, or even in the mounted folder is empty stop the script

what can i do here to ensure i can keep the --delete and not have to worry about losing my music if the mount fails?

View 9 Replies View Related

General :: Exclude Rsync Excludes From Delete?

Jul 9, 2010

im using rsync to sync files across multiple machines.

using the following:

rsync -az -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
--delete --delete-excluded --force --exclude=.git --exclude=.bundle
--exclude=tmp --exclude=log/* --exclude=*.log --exclude=*.pid
user@host:/path/to/src/ /var/build/dest

I want to exclude all log files from being transferred from the src to dest and delete all existing ones on the destination so im using --exclude=*.log with --delete-excluded which works great ...

but i want to keep a certain log file intact on the destination. I want a --exclude-from-delete option

Is this possible with rsync?

View 1 Replies View Related

Server :: RSync Without Delete Any File On The Destination?

Feb 16, 2010

I'm using rsync for a backup-sript at the moment and want to keep all files. The files are always unique, so I want to rsync without delete any file on the destination.

I've tried with --no-delete and --max-delete=0 but nothing seens to work. Is there even a possibility to do so?

View 2 Replies View Related

OpenSUSE :: Way To Get Rsync To Delete Files If They Were Deleting At Source?

Jun 11, 2011

I have 2 folders that are synced using rsync. Right now if I delete a file in the source folder, the destination folder still retains that file. Is there a way to get rsync to delete files if they were deleting at the source?I could not find anything in the man page.not sure if I'm missing something or if that feature just doesn't exist.

View 4 Replies View Related

General :: Rsync - Cygwin On XP - Delete Flag Not Working

Aug 4, 2009

I installed cygwin with rsync on a Win XP Machine. My goal is to backup a folder from one hard drive to another (both on XP machine).

I run the following command from a batch file:

Works fine except the --delete flag is not working. Copies everything in source to destination, but doesn't delete some extra files that are present on the destination, but aren't on the source, which it's supposed to. I looked at the rsync man page, and I'm doing everything right... such as not using wildcard.

The same command works perfect on another computer (XP machine; source and dest both on XP machine).

View 1 Replies View Related

Programming :: Rsync In A Backup Script Doesn't Delete-after

Oct 6, 2010

That is the whole script:

Code:
#!/usr/bin/env bash
# backup device for me, m.tornow, probably:
# /dev/sde1

[Code].....

and BU_MOUNTPOINT being the mount-point where a device is being mounted (duh).

View 6 Replies View Related

Ubuntu :: Rsync: Failed To Set Times On "/media/NAS":

May 16, 2011

Problem: rsync to NAS gives 'rsync: failed to set times on "/media/NAS": Operation not permitted (1)'

Efforts to date.

1.Initial set up was ubuntu 10.04 on stock DNS 323 NAS. Grsync would copy file names and folders to NAS but they all were 0 bytes and no data.

2.Set up FFP on NAS, installed rsync server on NAS, and retried. Grsync now copies all the files and folders,but get the 'rsync: failed to set times on "/media/NAS": Operation not permitted (1)'

3.Grsync with -t removed (does not preserve time) works without error message, but does not keep time/date on NAS backup.

Setup: NAS is automounted with CIFS:

//192.168.1.999/NAS/ /media/NAS cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77 0 0

Reading at length seems to reveal that this issue is a permission problem. So my question is:

1.Is there a simple edit to my fstab file that would give me permission to save time/owner to my NAS?

2.Would I be able to use chown to modify the folder on my NAS to own it? ***if so -> syntax to use chown on a network drive.

3.Do I need to edit my NAS rsync server to solve this?

4.I have a 1 gig network/cards, my speeds are 4mb/sec. Is this a good speed for this type of network, or is this a bug of CiFS networks?

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

Fedora :: /etc/security/console.perms.d/<*>.perms Files Being Ignored?

Jun 24, 2010

I am attempting to alter the permissions of /dev/snd and its contents to rw-rw-rw at boot time via the file /etc/security/console.perms.d/99-snd.perms, which contains the following lines:

##
<sound>=/dev/snd/* /dev/snd
<console> 0666 <sound> 0600 root
##

This has worked with previous Fedora installations up to Fedora 10, maybe even Fedora 11, but does not in Fedora 13. Further, the file /etc/security/console.perms.d/50-default.perms that has been present in the earlier versions of Fedora is missing; I don't even find it using 'yum whatprovides'. The Deployment Guide for Fedora 12 (there isn't one for Fedora 13 (yet?)), indicates that this is still the correct way to control console access to devices, and there are no mentions of any changes in the Fedora 13 Release Notes, but it is not working for mePS: I have verified that the permissions and selinux contexts of /etc/security/console.perms.d/99-snd.perms are correct although, in any case, it does not appear to be an selinux issue as booting with selinux disabled does not help. Searching through the various sysconfig, udev, etc.

View 2 Replies View Related

Software :: Create Symbolic Links From Recursive Folders?

Jun 7, 2010

However, can I run a command and create symbolic links for all files in a given folder and its subfolders and have all the links be in one folder?

I have a file structure such as:

FolderA
FolderB
FolderC

and I want to have symbolic links for all the files in the A, B, and C all in one new folder (FolderALL) for example. I have hundreds of folders that need to be done, so a simple 1 line command would be ideal if possible.

View 13 Replies View Related

General :: Recursive Delete Specific Files From Sub-directories?

Mar 4, 2011

I would like to be able to recursively delete specific various files from a directory and sub-directories. For example:

Dir/
|_sub1/
|
|_ _rm *file1 *file2 *file3

[code]....

View 11 Replies View Related

Ubuntu :: How To Use Rsync

Jan 27, 2010

I want to use rsync in order to have a folder synced at startup with my fat32 partition. I figured out how to mount the fat32 partition automatically at startup but I'm failing with the rsync command.I came across this script but it works only the first time, when there is a new file to sync it fails.

View 3 Replies View Related

Ubuntu :: Rsync To NAS Over SSH

Sep 20, 2010

I've bought a NAS (Western Digital My Book World Edition 1TB) which I want to use to make backups (preferably incremental) of some important files.

After much deliberation in finding suitable backup software it seems like good old rsync is the best thing for the job (backintime struggles to copy to remote locations?)

I have enabled SSH on the NAS config. I'm using the following command to do a test run on a small folder:

Code:
sudo rsync -azvv -e ssh /home/matt/Careers/ admin@192.168.1.100:/public/AutoBackup/
And I get the following error:
Code:
admin@192.168.1.100's password:

[Code].....

Anyone know where I'm going wrong here? I'm sure it's probably something simple but I can't crack it. I've tried variations on the destination folder such as admin@192.168.1.100:/AutoBackup/ without success.

View 4 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

Ubuntu :: Using Rsync To Sync Within The LAN?

Jan 18, 2010

I want to use rsync to synchronize some folders on my LAN. I have this working with two scripts; one runs at the beginning of my work session and gets the latest directory tree from the server, and the other runs at the end of the session to put any local changes back on the server. My "get" script looks something like this:

Code:
rsync -avuzb --backup-dir=/home/user/rsync_backup_dir --delete my_server:/home/bak/common_data/ /home/user/data

This works well, and with the "b" option any file that has been deleted from the master directory tree on the server will be deleted from the local machine and moved to the local backup directory. This is a safety measure to prevent the loss of files through a mistake (on my part).

The problem is the "put" script:

Code:
rsync -avuzb --backup-dir=/home/user/rsync_backup_dir --delete /home/user/data/ my_server:/home/bak/common_data

I want to run both scripts from the local machine, but the "put" script will not save deleted files to a backup directory. I tried using a remote backup directory like "my_server:/home/user/rsync_backup_dir" but this did not work. Is there a way to backup files deleted from a remote server from an rsync script run locally?

View 5 Replies View Related

Ubuntu :: Using Rsync For Backup?

Mar 2, 2010

I saw in a magazine reference to using rsync to have identical copies of folders. This looks like something I could find useful as I have a large number of items in need of safe backup.

I have the folders on an old system on a home network and would like to copy these over to a USB Hard Drive.

Currently the folders reside on SFTP xxx.xxx.xxx.xxx and I wish to sync them to a USB port on my laptop.

View 9 Replies View Related

Ubuntu :: Rsync - Ssh - Pgp Keys ?

May 15, 2010

I setup keyed ssh between two of my computers on my lan. It was working great. I used Ubuntu's Passwords and Encryption Keys tool to generate the key.

Yesterday I tried rsync'ing a grip of files to the ssh server and couldn't get it to work, I figured I was just messing the rsync command up. Today I just tried to log in using ssh and it just hangs there after I type the ssh command.

With verbosity on it stops at checking the blacklist file. Does this mean it decided my key is one of the badly generated ones? Why would it decide this now I thought it was supposed to catch that when generating the key.

Also I just checked that file it's trying to check doesn't even exist. Should it?

Code:

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







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