Rsync Both Ways

This is probably very basic, but I am totally new to Linux.

I am tryng to sync a usb data stick to Documents directory using:
rsync -auvhi /media/2C24-DC8F/ ~/Documents/

I then sync the other way [rsync -auvhin ~/Documents/ /media/2C24-DC8F/] expecting little or nothing, but end up with a massive list. A typical item being: .f.....g... boats/Siskiwit-Bay-SOF.pdf

My very limited undertanding makes me think that the group has changed during the first operation despite using -a, which I thought preserved the group.

Basically I am trying to keep /Documents and my data stick identical as I move between computers. Any suggestions?

Thanks


Similar Content



Rsync Question

Hey guys, I have rsync going to another remote server
it works good, however, lets say server A deleted a directory, server B wont sync up to it.

if I were to add a directory to Server A, then server B will add it as well. so server B is just not deleting stuff.

is there a proper rsync command i can use ?

would rsync -xzva --delete /src /dst delete everything and start the rsync from scratch? or is there another way to do this

More Command

hi guys, im having terminal trouble.

i have a libre word file called lintest.odt in the Documents directory (folder). I want to move it to the Libre directory (folder).

Desktop Downloads Libre Pictures Templates
Documents home Music Public Videos


from the root directory i typed cd Documents and then pwd and I got
/home/francis/Documents
i then typed ls and i got lintest.odt

I then typed mv lintest Libre and it says

mv: cannot stat ‘lintest’: No such file or directory

what am I doing wrong?

when i try to see the contents of the lintest file with more lintest
I got ~/Documents$ more lintest.odt
PK
�F^�2^L'
--More--(0%)
and then it locks up the terminal.

im obviously doing something dreadfully wrong.

Usr/bin

given that im in the home directory, what cli command should i typoe to get access to my documents folder which i can clearly see in the gui but cannot seem to access.

i thought logically it should be /home/files/documents or perhaps /home/user/files/documents

where am i being a dweeb!!!!!....... again

Utilizing Rsync To Backup Data But Symbolic Links To Included

Please forgive me but I'm a little new to Red Hat (RHEL 5). I'm using rysnc to backup critical data and to a second disk; here is what I'm typing at the command line rsync -rvgal /data/disk1/share /data/backup/share. It appears that the softlinks are not transfered to the backup drive and some of the links point to data not located in the source folder (/data/share). After reading the rsync man page I was a little confused about the L option (vs the l option). In order to ensure that the linked files are moved should I type the below:

rsync -rvgaL /data/disk1/share /data/backup/share

A million thanks,
Johnny Mac

Rsync-/usr/bin/rsync: Argument List Too Long

Hi
I am trying to send lakh of small(JPG,PDF) files from one server to another. So am using rsync which helps differential copy, but when using it getting error as /usr/bin/rsync: Argument list too long.

Kindly help, other than rsync if any option is also there kindly update.

Thanks in advance


sswaran

Rsync Operations Not Permitted

hello guys, just want to ask I have files on the server running SUSE 11 and i rsync to My WD Cloud via NFS.

but i notice some it shows some error like "This operation is not permitted"

I had used rsync -av parameters.

But when I used rsync -rltuv parameters it seems to work fine.

Why rsync -av parameter is used there are errors even though I set on WD My Cloud shared folder as the permissions as 777?

Thanks for any input.

Managing Startup And Shutdown Dependencies

I have a dedicated PC providing storage of my music collection and streaming albums via Logitechmediaserver (LMS). OS is Arch running headless. For performance purposes I'd like LMS to access its SQLite database files from a RAM disk which must be dynamically created on startup of the PC with DB copied across from HDD prior to startup of LMS. On shutting down the PC the only changed files should be copied from the ramdisk back to the HDD. The intent would be to use rsync for the copying.

/etc/fstab is configured to create the ramdisk on startup:
Code:
tmpfs      /mnt/ramdisk tmpfs     defaults,size=4096M 0    0

and LMS has already been configured to look for its DB files in /mnt/ramdisk.

LMS' unit file is /usr/lib/systemd/system/logitechmediaserver.service. Its contents is as follows:
Code:
[Unit]
Description=Logitech Media Server Daemon
After=network.target

[Service]
User=logitechms
Group=logitechms
PIDFile=/var/run/lms.pid
WorkingDirectory=/opt/logitechmediaserver
ExecStart=/opt/logitechmediaserver/slimserver.pl \
	--prefsdir /opt/logitechmediaserver/prefs \
	--cachedir /opt/logitechmediaserver/cache \
	--logdir /opt/logitechmediaserver/Logs

[Install]
WantedBy=multi-user.target

On the startup leg, the data needs to be copied prior to launch of LMS, on the shutdown leg, LMS needs to be stopped and trigger the rsync diff copy. How would I best go about calling a script on startup and shutdown of the PC to ensure that the contents is synced to and from ramdisk on startup and shutdown?

Ok, here is what I've done so far, perhaps someone can critique it for me:

I created a file /etc/systemd/service/sync-lms-to-ramdisk.service containing the following:

Code:
[Unit]
Description=Copy LMS data data directory to ramdisk
After=network.target
Before=logitechmediaserver.service

[Service]
ExecStart=/usr/bin/sync-lms-to-ramdisk.sh

[Install]
WantedBy=multi-user.target

I then created /usr/bin/sync-lms-to-ramdisk.sh containing the following:
Code:
#! /bin/sh 
# /usr/bin/sync-lms-to-ramdisk.sh
#

rsync -av /mnt/md127/zSqueezeCache/ /mnt/ramdisk/
exit 0

I made it executable as follows:
Code:
chmod 755 /usr/bin/sync-lms-to-ramdisk.sh

I then enabled the Unit as follows:
Code:
systemctl enable sync-lms-to-ramdisk.service

If I'm not mistaken that should ensure that the ramdisk is populated before LMS fires up

Well, rebooted the server and the ramdisk is populated, but all is not well - LMS is inaccessible.

# systemctl status logitechmediaserver yields:

Code:
# systemctl status logitechmediaserver
● logitechmediaserver.service - Logitech Media Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/logitechmediaserver.service; enabled)
   Active: inactive (dead) since Sun 2015-03-08 17:25:46 SAST; 18min ago
  Process: 411 ExecStart=/opt/logitechmediaserver/slimserver.pl --prefsdir /opt/logitechmediaserver/prefs --cachedir /opt/logitechmediaserver/cache --logdir /opt/logitechmediaserver/Logs (code=exited, status=0/SUCCESS)
 Main PID: 411 (code=exited, status=0/SUCCESS)



cat /usr/lib/systemd/system/logitechmediaserver.service yields:
Code:
[Unit]
Description=Logitech Media Server Daemon
After=network.target

[Service]
User=logitechms
Group=logitechms
PIDFile=/var/run/lms.pid
WorkingDirectory=/opt/logitechmediaserver
ExecStart=/opt/logitechmediaserver/slimserver.pl \
	--prefsdir /opt/logitechmediaserver/prefs \
	--cachedir /opt/logitechmediaserver/cache \
	--logdir /opt/logitechmediaserver/Logs

[Install]
WantedBy=multi-user.target

Quick question - is /etc/fstab processed before all of the abovementioned?

Ok, I've got the problem narrowed down to folder permissions. for some reason on creation of the ramdisk its owner is samba whereas it should be owned by logitechems. I amended /usr/bin/sync-lms-to-ramdisk.sh to change ownership of /mnt/ramdisk to logitechms:
Code:
 
#! /bin/sh 
# /usr/bin/sync-lms-to-ramdisk.sh
#

chown logitechms:logitechms /mnt/ramdisk/
rsync -av /mnt/md127/zSqueezeCache/ /mnt/ramdisk/
exit 0

However, on reboot ownership is again assigned to samba

Any ideas?

Rsync Cronjob Question

hey guys, sorry for asking a dumb question, but some of the terminology online is not grasping me well, and still leaving me confused


in crontab -e

I have a shell script that contains

rsync /home/willc86 willc86@server02:/home/willc86/backup

the script works good by itself, however i have to put in a password which I understand. i know crontab works, because i used rsync script in the local machine. I am just having problems trying to sync it to another server

how do i get this rsync going in crontab to back it up to another server.

Assign Group Permission To Newly Created Files

Directory /media/data/torrents/ has permissions 775, user yzt, group transmission

yzt and debian-transmission are members of the group transmission.

transmission-daemon is run by debian-transmission, and the new files it downloads have permissions 644, owner debian-transmission, group transmission. This is a problem, because I can't later move the files as my user, yzt, and need to be switching to root to change the permissions/ownership to be able to do so.

Using sticky bit I could copy it to anywhere else, but I'm interested on actually moving the file, not just copying it. I could run transmission-daemon as yzt and problem solved, but I rather have that internet facing service running by a limited user, just in case some vulnerability is found on Transmission.

So my question is, how can I set that every new file created under /media/data/torrents/ has permissions 775 like its parent directory?

How To Write Other Language, [i.e. 'Kannada'] Word Documents In Linux Mint 17

Hello everybody,

My system specifications: Samsung RV509, i3, 300GB HDD, 3GB Ram, Dual boot Windows7 & LM 17 cinnamon 32bit.

I have OpenOffice preinstalled on my system. I would like to create 'kannada' language word documents and be able to save them as windows .doc type file and/or .pdf file. [Kannada is the language of a state in south India.]

In case of windows; some 'kannada' language softwares called as 'Baraha' and 'Nudi' are available, that can be installed on a windows pc and 'kannada' language word documents can be created there.

These 'kannada' language softwares are not available for Linux.

However I want to be able to create 'kannada' language word documents on my Linux machine.

Is this possible? Could someone please kindly help me in this regard? I would be greatfull.

Thanks & Regards

Anil