Article View: alt.privacy.anon-server
Article #282944Re: Rsync Between 2 Users on Same Computer
From: Anonymous
Date: Sat, 28 May 2016 23:31
Date: Sat, 28 May 2016 23:31
62 lines
3733 bytes
3733 bytes
> On Sat, 28 May 2016 03:10:38 -0000 (UTC), you wrote: > >> >> On 2016-05-28, Bit Twister <BitTwister@mouse-potato.com> wrote: >>> On Sat, 28 May 2016 01:45:00 +0200 (CEST), Anonymous Remailer (austria) wrote: >>>> >>>> I have a directory of files that I would like to sync on a nightly >>>> basis between two users on the same computer. The master files will >>>> be owned by the root user and the sync will be done to another user >>>> on the same server. >>>> >>>> Can someone provide the correct syntax to perform this task? >>> >>> man rsync should provide all the options available to do whatever >>> you like. >>> >>> If you want exact copy then something like >>> rsync -aAHSXxv --delete /root/wherever/ /home/user_here/wherever >>> going to guess you will also need to add the --chown=USER:GROUP switch/data. >> >> That assumes that the stuff in /root/whatever is the true stuff, and >> anything in /home/user)here/wherever is junk, which, if it differs needs >> to be eliminated. If that is not what you want, you will need to change >> the option. >> Ie, asking for help and then not giving us the least indication of what >> you want to accomplish is sure to get you advice which is not >> appropriate to what you want. >> Please tell us in more detail what you want to accomplish. > > I have a backup of my server that creates a .gz file and places it > in a folder called panelbackup which is owned by root. I would like > to copy this file to another user on my computer that has access to > syncthing. I use syncthing to replicate various folders from my > server to my laptop. I can copy the .gz file that is owned by root > to another user on the same computer that has access to syncthing > and be done with it, but I would like to have rsync do the copying > for me and then add this to a cron job. > > Syncthing is launched as a non-root user which means that I can't > sync any of my root folders to other users on remote computers. So > the plan was to figure out how to copy a file or folder that is > owned by root to a non root user and then syncthing the results to > my remote computer as a backup. > > I created a text file as root and changed the owner to user2 and > then tried to rsync the text file from root to user2 and it didn't > work. I also tried to rsync the file when it was owned as root to a > directory that is owned by user2 and couldn't get that work either. > The commands I have tried when text.txt was owned as root and user2 > are: > > rsync -a /panelbackup/test.txt /home/user2folder/test.txt > rsync -a /panelbackup/test.txt /home/user2folder/ > rsync -a /panelbackup/test.txt ~/user2folder/test.txt > rsync -a /panelbackup/test.txt ~/user2folder/ > > Server is Debian 7.0 with syncthing v0.13.4, Linux (64 bit) > Windows 10 Laptop with syncthing v0.13.4, Windows (64 bit) > rsync version 3.0.9 protocol version 30 Why don't you set up a cron to copy the root file to the Syncthing user a couple of minutes before that user does its rsync.
Technical Details
Message-ID:
<b3bf5dd91bfbd435a3580972a9fd3a40@foto.nl1.torservers.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<2388a45a745e88081023146f5d551405@dizum.com>Show Full Headers
Complete Article Headers
Message-ID: <b3bf5dd91bfbd435a3580972a9fd3a40@foto.nl1.torservers.net> Subject: Re: Rsync Between 2 Users on Same Computer Date: Sat, 28 May 2016 23:31:47 +0000 From: Anonymous <anonymous@foto.nl1.torservers.net> References: <2388a45a745e88081023146f5d551405@dizum.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: alt.privacy.anon-server Organization: dizum.com - The Internet Problem Provider X-Abuse: abuse@dizum.com Injection-Info: sewer.dizum.com - 194.109.206.211