Tag Info

New answers tagged

1

Unison is designed to be a bidirectional rsync. You can nonetheless use it in one direction if you wish. Unison prompts you to decide what to do for each file; press > to copy forward or / to skip a file. There's also a GUI if you prefer that. Alternatively, you can link the files into a staging area, then synchronize the stating area and clean it up. ...


0

A couple of variations on your option 2 seem plausible. I'll continue to assume you usually log in with $USER on $HOME, just like in your scenario. You've stated that you can't copy the files from $HOME to $CHOME because of permissions issues ($USER can't access $CUSER), and you can't bypass that with root because of your root_squash. 2a. Adjust the ...


1

I had a similar problem when using rsync to backup my system to my server. I used: rsync -aAXSHPr \ -e ssh \ --rsync-path="sudo /usr/bin/rsync/" \ --numeric-ids \ --delete \ --progress \ --exclude-from="/path/to/file/that/lists/excluded/folders.txt" \ --include-from="/path/to/file/that/lists/included/folders.txt" \ / ...


0

I can only provide a guess, which is that the discrepancy is explained by varying computational, memory, caching or disk characteristics of the two hosts: If we assume that CPU is a bottleneck, then it would make some sense if the slower machine were slower at sending (this assumes that encrypting is more computationally heavy than decrypting). This can be ...


2

The file names you show look like the temporary files that rsync creates while transferring files (upon successful completion, those are then atomically renamed to the proper name; without the leading dot and trailing six-character extension). They are normally deleted if the rsync transfer is interrupted cleanly (perhaps because the connection has been ...


0

I had the same problem recently using rsync 3.1.1 (and 3.0.9) under cygwin and pulling from a remote linux machine (rsync 3.1.0). In my case it turned out to relate to spaces in the source path. The solution was to enclose the path in double quotes and then enclose this in single quotes e.g. $ rsync user@myremoteserver.com:'"Documents/016054 signed ...


1

Have you already experienced a system crash where you needed to restore the working filesystem from a backup? I'd propose you setup a reference system and then draw the plug. Depending on your amount of data you then can decide, if you need daily, weekly or monthly full backups.


0

A tested way to do the parallelized rsync is: http://www.gnu.org/software/parallel/man.html#EXAMPLE:-Parallelizing-rsync


1

Rather than mixing find and rsync, since all you appear to want to copy are the *.xq files, you can tell rsync to do this directly. I've included the --dry-run flag so that you can safely test it without any changes being effected; when you're ready simply remove it from the command line. rsync --dry-run -av --include '**/' --include '*.xq' --exclude '*' ...


1

What you observe is exactly what is happening: just HOST: without an explicit path asks to copy the entire default directory (usually the home directory): Note also that host and module references don’t require a trailing slash to copy the contents of the default directory. For example, both of these copy the remote directory’s contents into "/dest": ...


1

For the reasons mentioned in the comments, file managers do usually not use rsync to copy, but above all, a good backup solution should be incremental. Just imagine that one of your students makes an accidental change in a file and then copies it, as he was told to do as soon as possible, over the previous backup (using a file manager or rsync). A graphical ...


0

This is my preferred solution: find source_dir -iname '*.jpg' -print0 | rsync -0 -v --files-from=- . destination_dir/ The find command is easier to understand than the include/exclude rules of rsync :-) If you want to copy only pdf files, just change .jpg to .pdf


1

There are two options. Both use rsync. Either: Only update share1 and share2, deleting unknown files in the target rsync --dry-run -avP --delete .../src/share1 .../src/share2 .../des/ Or: Update everything in des, deleting unknown files in the target except for des1 rsync --dry-run -avP --delete --exclude '/des1' .../src/ .../des/ When you're happy ...


1

The clue is in the line: Matched data: 0 bytes This means that for some reason no blocks at all of the old file were matched with the new file, meaning that the entire file has been transferred. If you're interested in the network traffic, then the following line gives accurate information about this: sent 13.78M bytes received 31 bytes 27.56M ...


0

What you want sounds like having a Truecrypt disk file synced with Dropbox. Something is changed in the Truecrypt file, and only the changed part is uploaded to Dropbox. This seems to be the case. See: rsync - Backup only changed blocks? You add something to the file, making it larger. That is not the same, and I don't think that will work, unless you put ...


0

I use notepad++ which has a plugin NppFTP. It can be set up to copy files using sftp, then when you save the file, it uses ftp again to store the file on a remote server.


2

What we do in my team is use puppet to control this sort of file with the config stored in a subversion repository. Each person checks out a copy of the repository to their local machine, uses their favoured editor to make changes and then commits the change. The changes are automatically applied to the live machines by puppet (which runs with admin privs). ...


1

The CPU is available for other uses while disk I/O occurs, so it doesn't count towards a process's CPU time (the user and sys figures). That's because, as you guessed, that operation is happening in the disks (likely in more or more microcontrollers soldered to the disk's boards)


2

Bash's built-in time returns the exit status of the command. You can test that fairly easily with time false; afterwards, echo $? prints 1 as expected. You can also test something with a different exit code to confirm other codes are preserved: $ time bash -c 'exit 42'; echo "Exit code: $?" real 0m0.002s user 0m0.000s sys 0m0.000s Exit code: 42


1

Editors can follow several strategies to save a file. The two major variants are to overwrite the existing file, or to write to a new file and move it in place. Writing to a new file and moving it in place has the nice property that at any point in time, reading from the file gives you a complete version of the file (one instant the old one, the next instant ...


0

sudo would seem to fit in this case. sudo for terminal (cli) commands and something like gksu for gui commands is pretty standard. The problems your having probably have noting to do with how you choose to elevate permissions. For example, holding the terminal open is the job of the emulator, and has noting to do with bash.


1

Depends on how compressible is your data and the processing power of your source and destination. A full disk backup in my experience will compress to about 30-50% of its original size, so it might be worth to give it a shot. Otherwise, don't bother with compression. It might be worth to test your compression rate with pigz -c <your file> | wc -c and ...


1

There are multiple things the rsync program needs to do, among them: finding files that are not in sync with the remote server deciding which parts need to be transmitted transmitting the deltas so the "other side" can be updated Often, but not always the transmission part is the limiting factor in bandwidth. Rsync doesn't do parallel transfer of patch ...


5

If you have a very slow connection (think GPRS) you definitely want to compress you data as much as possible. (Otherwise your connection will slow thinks down.) If you have a very slow CPU and a fast connection (like an embedded network device) you usually do not want to compress your data. (Otherwise your CPU will slow things down.)


1

Yes, the speed of the connection determines if the speeds things up. It will be overhead only for USB backup, because not the disks inflates the data but the process that writes the data. So the same machine that reads and deflated it, has to inflate and write it too. Rsync is still two processes I think but your memory to hand data from one process to the ...


2

It is possible to copy relative symlinks using --links option: -l, --links When symlinks are encountered, recreate the symlink on the destination. Also: Note that --archive implies --links. Example: $ mkdir /tmp/tarsnap-test/ $ cd /tmp/tarsnap-test/ $ mkdir orig backup $ cd orig/ $ mkdir dir $ ln -s dir symlink $ ll total ...


2

rsync --… oldroot/etc etc copies the source directory etc to a subdirectory of the destination directory, so a file oldroot/etc/foo ends up copied to etc/etc/foo. If you want to copy a directory to a directory of the same name, specify the parent of the target directory: rsync -a oldroot/etc . If you want to copy a directory onto another directory, tell ...


0

On my SuSE 11 system, I found the banner message in /etc/issue.net and then remarked out the banner line in my /etc/ssh/sshd_config file. #banner /etc/issue.net Then restarted the ssh daemon service sshd restart This suppressed the banner when using scp inside scripts and cleaned up the log files.


0

You can use the -r option to cp (or -a if you want to preserve all attributes): cd Dept2; cp -r function /path/to/Dept3/ (this assumes that with one shot you mean a oneliner). If Dept2 and Dept3 are under the same parent direcotry you can also do cd Dept2; cp -r function ../Dept3 which is somewhat shorter


0

You could use something like rsync -avP --inplace user@remote:/path/to/archive.dat CopyOfLocalArchive.dat This tries only to transfer differences. If the archives are too different there won't be too much benefit. But maybe worth a try.


1

Some clarification of the question may be required. Rsync will make a copy of the source directory. If you perform an rsync and then alter the destination those changes would be overwritten during the next rsync. If you're only looking to modify the source I would recommend taking a look at incremental backups with rsync. I use a script based on this ...


1

–link-dest should be --link-dest. I copied –link-destfrom the linked webpage, and still don't know how to tell – and - from each other in a webpage and in terminal. If you know, can you tell me? Thanks.



Top 50 recent answers are included