exclude omit files/directories from sync, in this case I exclude a directory called 'Downloads' timeout=60: kill it after 60 seconds if it gets stuck stats: show summary of how many files and bytes transferred at the end P: show progress for big files so I know if it's frozen or not avzh: a-Archive, v-Verbose, z-Compress, h-Human-readable, these are the common options (more: ) Rsync: library to sync files, comes with MinGW Documents"īash: starts MinGW which has a built-in rsync library I want to sync all of the 'My Documents' folder on this external drive with a folder of the same name on an external drive on my remote linux computer.īash -c "rsync -avz -P -stats -timeout=60 -exclude Downloads. The batch file is in an external drive on my Windows computer. This changes directory one level up from where the batch file is (to 'My Documents'). This just emits a message to remind me what's going on. (assuming we are in G:/My Documents/My Various Things) Here's a bit of line-by-line explanation: (assuming we are in G:/My Documents/My Various Things)īash -c "rsync -avzh -P -stats -timeout=60 -exclude Downloads. Here's the batch file ( my_rsync_file.bat) REM Changing directory. I have MinGW (also known as 'Git Bash') on Windows 7, and a batch file that runs rsync to back up files on an external drive on a remote linux computer. Say I want to have a folder called C:\www on my Windows machine and keep it updating \var\www on my remote machine, how do I do that? It's not a backup per se, it updates the files that I edit with my local computer. Can someone provide the steps to set up the connection from the Windows 7 machine to the Linux server remotely? I installed cygwin on my Windows 7 machine and installed the rsync package. I do not want two-way access between the machines, I am only going to be editing files on my local machine and keeping them updated on the remote machine. This is for the purposes of setting up a web server on the remote machine and the editing on my local machine and keeping the files in sync. ![]() The command rsync is already enabled on the machine and I can edit any needed access to the machine. The remote Linux server is using Amazon's Linux AMI. What software is needed on the Windows 7 machine to use rsync? So (I'm pretty sure) we need to set the correct SELinux values on the files/folders to allow rsync to (over-)write them - but I can't work out what the relevant SELinux command should be.Īlso FTR: Permanently disabling SELinux is not an option - the boss would have my head if I were to even suggest this.How do I use the rsync command from a local Windows 7 machine to a remote Linux server? The LAN dnf part of the system is working fine - ie our servers are running dnf both manually and automatically and pulling the software from our local mirror without issue. So obviously we've got the http SELinux settings correct. The local mirror server is using NginX for its web-engine, and we can (web-)browse to all of the copied repos/files without issue, including downloading individual files from the local mirror by clicking on the file in the browser. We know it's SELinux because when we (temporarily) disable SELinux everything works 100% AOK.įTR: We're dumping the copied repos/files into the root/base directory: /repositories/el9/*. Everything is working properly except that SELinux is causing the rsync script(s) we are using (running as root via a systemd.timer) to return write permission issues. We've got a local repository mirror server for a number of EL9 repos (Rocky Linux, Ghetto Forge, Remi, EPEL, etc) that we've set up to sync periodically. ![]() I'm hoping some nice individual will take pity on me and help me out / point me in the right direction - and thanks in advance for being a nice person. ![]() ![]() I've been researching this issue for a few weeks now and I've gotten to the stage where I've overloaded my brain with information and now can't see the forest for the trees. TL/DR: SELinux stopping Rsync from writing to local Repository Mirror from Public Repositories - Please Helpįirst off: Sorry if this is posted to the wrong thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |