Results 1 to 3 of 3

Thread: Help with basic rsync command

  1. #1
    Join Date
    Oct 2017
    Beans
    1

    Help with basic rsync command

    A quick newbie question about a linus command.
    I am trying to move the /home folder to 2nd HDD and little confused, the below command has two periods, (.), are these needed? Both after /home .


    "sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/."

    -------------------------------------------------------------------------------------
    Hello, my name is Myca, nice to meet Everyone. giup viec nha | giúp việc nhà
    Last edited by thanhmy; October 20th, 2017 at 01:44 PM.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,364
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Help with basic rsync command

    Put the --exclude after the source and target.

    Code:
    cd /
    sudo rsync -av home /media  --exclude=*.gvfs*
    will copy the entire /home to /media/home except for any .gvfs directories.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Help with basic rsync command

    I use an exclude file as there are several sub-folders with cache, temp files, thumbnails, etc that you do not need to copy.

    Oldfred's list of stuff to backup May 2011 (still mostly current, see added links below):
    http://ubuntuforums.org/showthread.php?t=1748541
    Adding extra commands to rsync
    http://ubuntuforums.org/showthread.php?t=2260658
    More detail on /etc files and others to backup - post #3:
    http://ubuntuforums.org/showthread.php?t=1500559
    Some files(temp, cache etc) to exclude from /home backup - post #8 by Paddy Landau
    http://ubuntuforums.org/showthread.php?t=1883834
    http://askubuntu.com/questions/54565...seless-folders
    http://askubuntu.com/questions/40992...ry/40997#40997
    /home/*/.cache
    /home/*/.dbus
    /home/*/.dropbox
    /home/*/.gvfs
    /home/*/.local/share/Trash
    /home/*/.mozilla/firefox/*.default/Cache/**
    /home/*/.qt
    /home/*/.thumbnails
    /home/*/Examples
    /home/.ecryptfs
    /home/lost+found
    /home/*/.local/share/Trash
    /home/*/.mozilla/firefox/*.default/Cache/**
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •