treasuresoli.blogg.se

Linux grsync
Linux grsync






linux grsync
  1. #Linux grsync install#
  2. #Linux grsync archive#
  3. #Linux grsync trial#

When you use this, rsync will print the list of changed files that it’s sending and the time it takes, the amount of data copied over, etc. I like to use this when I’m testing an rsync command before adding it to a script. The verbose option (v) tells rsync to print to the terminal what it’s doing in greater detail. This is generally a good idea to include.

#Linux grsync archive#

The options are archive (-a), which tells rsync to copy files recursively and to preserve group and user ownership when it copies files. You have the rsync command followed by four options and one argument. The -avhz following rsync is the same as using -a -v -h -z, but much easier to type. Here’s a basic example to copy files from a home directory to a USB drive: rsync -avh -exclude="*.iso" /home/user/bin/ /media/diskid/user_backup/Īs you can see, you can combine options after one dash. I use rsync to back up to a local USB disk when I travel, and also use rsync to back up files to an offsite service and from my Web server to my local machine for archival. This can be a local filesystem, or a remote system. To send a file from point A to point B, you tell rsync to copy from your source to the destination.

linux grsync

The package should be “rsync” on just about any major distribution. For instance, on openSUSE I’d use: sudo zypper in rsync

#Linux grsync install#

If not, use your distro’s package manager to install rsync. Most Linux distros should have rsync installed by default.

linux grsync

The GUI tools do some things rsync can’t (such as sharing files with other users and groups like iFolder) or doesn’t do easily - like just dropping a file in a folder and having it synced up to a remote machine. It can do a lot of things that GUI tools can’t, or don’t do well - like syncing files from your home directory to a locally attached USB disk. Use rsync when you want to do unattended backups, or complex syncing operations. They’d be a good topic for a separate article, but the use case for iFolder or Dropbox is different than rsync. Those tools are well-suited for things like making sure a Documents directory is backed up regularly or available from another location when you’re traveling or in the event of a crash. Using a single computer for personal use, you might want to use a tool like iFolder or Dropbox for simple backups.

#Linux grsync trial#

This is to run through a trial run with no actual changes made. The first time you get ready to run an rsync command, particularly the first few times out, you might want to make use of the -n option (also –dry-run if you prefer the more verbose option name). Be mindful of the fact that once files are deleted on Linux they’re very hard if not impossible to recover, and that’s probably the opposite of what you’re trying to accomplish. If used incorrectly, though, it can also be an effective tool at overwriting data or deleting files. One word of caution before beginning: As an effective tool, rsync is great at moving data from one machine to another. A quick glance at the man page might be a bit intimidating, though, so let’s walk through some of the most commonly used options and see if rsync is right for you. You can use rsync to copy files to remote systems and back again, or to make backups to locally mounted hard drives. As the name implies, rsync is used to sync files on remote and local machines. One of the handiest tools you’ll ever have on Linux (and other *nix systems) is rsync.








Linux grsync