Tag Info

Hot answers tagged

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.)


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 ...


2

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" \ / ...


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). ...


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


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 ...


1

After your last backup using the old disk, create a timestamp and then backup files after that timestamp. You'll use find and the --newer flag to list files newer than the timestamp, then the --file-from flag to rsync to specify that list of files for copying. Here's how: Step 1: Before you swap to the new drive: touch /someplace/timestamp.txt Step 2: ...


1

presumably you have ssh access to the server? so either: grant the server ssh access to your local machine and then use something like ssh you@server 'find ... | xargs -0 -I {} rsync "{}" you@yourmachine:/media/dir' or: create a list of files on the server using find, then copy this file to your local machine and run rsync from there to grab these files ...


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. ...


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 ...


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.


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

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 ...


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)


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 ...


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 ...


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

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 ...



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