Tag Info

Hot answers tagged

3

I believe the issue is that rsync sees the path names as being relative to the source directory. So, for example, if I'm syncing this directory: $ ls /home/me/foo bar baz Then the file paths it knows will be like foo/bar/... and foo/baz/.... If you add the verbose flag to rsync, you'll see things like: public_html/foo 277 100% 0.56kB/s ...


2

Remove the \ from before the space. An escaped space is used to stop the shell splitting at spaces. As you are using a file to list your excluded directories and files then the words Mendeley Desktop will never pass through the shell and therefore will not need escaping. If you were listing them on the command line with --exclude then you'd need to escape ...


2

The important things are your data! Programs (and the rest of the system) can always be re-installed from scratch from DVD and your distro's repositories. That said, it may be a good idea to back-up /etc with your configurations (if you've done many changes) and perhaps /usr/local if you've installed many packages locally. The important stuff is /home ...


1

If you only have a root partition you should make a full backup of that (and if you have e.g. a separate /home you should back that up as well). The most easy way to do so is use the -x/--one-file-system option of rsync so that you can recurse from / downward without including temporary/virtual filesystems like /run/lock or /dev The first time this will of ...


1

The rsync manual warns about this scenario (section “Include/exclude pattern rules”): this won't work: + /some/path/this-file-will-not-be-found + /file-is-included - * This fails because the parent directory "some" is excluded by the '*' rule, so rsync never visits any of the files in the "some" or "some/path" directories. One solution is to ask ...


1

Use the following command: rsync -av --include-from=DirectoriesToCopy.txt --include /data/ --exclude='/data/*' --exclude='/*/' / /media/MyDestination/ You need to include /data/ explicitly, you could also have added that to the list in the file. Then exclude all other directories (order is important with includes/excludes). Note that your usage of -r was ...


1

The order of --include and --exclude options is relevant. You are first including all *.pdf files, the later exclusion of *web*.pdf never applies because of this. Note also that include/exclude patterns apply to node names (files, directories, etc.) and not to pathnames, unless you have a / or ** in the pattern; so excluding *web*.pdf wouldn't exclude ...


1

This already does a full backup. The contents of the directories that are excluded (such as dev, run, etc) are created in run time and should not be backed up. Copying boot folder will not override your boot sector, so that is fine. Using rsync here is the correct method as rsync can work within the same system or remotely and it will also only update ...


1

Your theory sounds right to me. Each time through the for loop when you invoke rsync, it's reconnecting to the server and causing you to be re-prompted. Rather than loop through the file, ~/list using for you could give this list directly to rsync using the --files-from= switch. Example $ rsync --partial -z --files-from=/some/list server:/some/location/ ...



Only top voted, non community-wiki answers of a minimum length are eligible