Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync exclude not excluding file patterns #7320

Closed
laggingreflex opened this issue May 17, 2016 · 3 comments
Closed

rsync exclude not excluding file patterns #7320

laggingreflex opened this issue May 17, 2016 · 3 comments

Comments

@laggingreflex
Copy link

laggingreflex commented May 17, 2016

I'm using Vagrant Synced Folders in RSync mode and trying to exclude certain filetypes.

The folders (.git, node_modules*) are excluded as expected, but the files (*.lnk, .sublime) are not.

My config is like this:

config.vm.synced_folder '.', '/home/vagrant/app',
  type: 'rsync',
  rsync__exclude: [
    '.git*', 'node_modules*',
    '*.lnk', '*.cmd', '*.sublime*', '*.sh'
  ],
  rsync__verbose: true

Here's the log of the sync:

    default: VirtualBox Version: 5.0
==> default: Rsyncing folder: /cygdrive/c/web/project/ => /home/vagrant/app
==> default:   - Exclude: [".vagrant/", ".git*", "node_modules*", "*.lnk", "*.cmd", "*.sublime*", "*.sh"]
==> default: Showing rsync output...
==> default: rsync[stderr] -> Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
==> default: rsync[stdout] -> sending incremental file list
==> default: rsync[stdout] -> ./
==> default: rsync[stdout] -> Project.sublime-workspace   << "*.sublime*" should've been excluded
==> default: rsync[stdout] -> project.chrome.lnk          << "*.lnk"
==> default: rsync[stdout] -> query.js
==> default: rsync[stdout] -> project.sql
==> default: rsync[stdout] -> vagrant.bootstrap.sh
==> default: rsync[stdout] -> vagrant.load.cmd            << "*.cmd"
==> default: rsync[stdout] -> client/
==> default: rsync[stdout] -> client/.babelrc
==> default: rsync[stdout] -> client/.eslintrc
==> default: rsync[stdout] -> client/client.sublime-project
...

It's copying the files that are supposed to be excluded.


Vagrant version

Vagrant 1.8.1

Host operating system

Windows 10

Guest operating system

Ubuntu trusty64

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.synced_folder '.', '/home/vagrant/app',
    type: 'rsync',
    # rsync__verbose: true,
    rsync__exclude: [
      '.git*', 'node_modules*',
      '*.log', '*.lnk', '*.cmd', '*.sh',
      '*.sublime*',
    ]
end

Debug output

https://gist.github.com/laggingreflex/98c6c6d07561fcbacc66a2770aeb3530

Expected behavior

I wanted to exclude some file types (*.lnk, *.cmd, .sublime, *.sh). They should not have been copied.

Actual behavior

The files got copied regardless the exclude rule.

Steps to reproduce

  1. Setup vagrant with rsync and exclude some filetypes with rsync__exclude:['*.log']
  2. See if the files are actually copied

References

Question on stackoverflow
this issue might be related: #4069

@laggingreflex
Copy link
Author

This seems to fix it

@chrisroberts
Copy link
Member

Hi there,

It looks like this has been resolved within a previously shipped version of Vagrant so I am now closing this issue. If the original issue was not fully resolved, please reopen this issue or create a new one.

Cheers!

@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants