=== pendejo === To copy files from remote to local, maintaining file properties and sym-links (-a), zipping for faster transfer (-z), verbose (-v). rsync -avz host:file1 :file1 /dest/ rsync -avz /source host:/dest Copy files using checksum (-c) rather than time to detect if the file has changed. (Useful for validating backups). rsync -avc /source/ /dest/ Copy contents of /src/foo to destination: This command will create /dest/foo if it does not already exist rsync -auv /src/foo /dest Explicitly copy /src/foo to /dest/foo rsync -auv /src/foo/ /dest/foo LMGM MAIL work mails #rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/Mail /home/barriot/Documents/Mail/work/Mail rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/Mail/Local/ /home/barriot/Documents/Mail/Local/WORK.Local.sbd/ # pendejo /home/barriot/box.local on biskit (run as root) rsync --dry-run --archive --hard-links --delete --acls --xattrs --one-file-system --itemize-changes --stats -h --exclude='*/.thumbnails' --exclude='*/Cache' --exclude='*/.cache' --exclude='*/.gvfs' --exclude='.local/share/Trash/' /home/barriot/box.local/ /run/media/barriot/ext/pendejo.barriot/box.local/ # TEACHING USB rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/TEACHING/2016-2017/L2-L3-Bioinfo/ box.local/TEACHING/2016-2017/L2-L3-Bioinfo/ AMAP rsync --dry-run --itemize-changes --stats -h --archive box/Administrative_stuff/amap/ box.local/Administrative_stuff/amap/ rsync --dry-run --itemize-changes --stats -h --archive box.local/Administrative_stuff/amap/ box/Administrative_stuff/amap/ System and data backup # linux time rsync --dry-run --exclude '*.fucked.up' --itemize-changes -a --stats -h /boot/ /run/media/barriot/barracuda3t/pendejo/boot/ time rsync --dry-run --exclude 'win7-HardDisk1.vdi' --exclude '*.fucked.up' --itemize-changes -a --stats -h --hard-links --acls --xattrs --one-file-system / /run/media/barriot/barracuda3t/pendejo/rootfs/ time rsync --dry-run --exclude .cache --exclude 'win7-HardDisk1.vdi' --exclude '*.fucked.up' --itemize-changes -a --stats -h /home/ /run/media/barriot/barracuda3t/pendejo/home/ # win time rsync --dry-run --exclude '*.fucked.up' --itemize-changes -a --stats -h --hard-links --acls --xattrs --one-file-system /mnt/win_boot/ /run/media/barriot/barracuda3t/pendejo/sda1.WD500Gb.win7_boot/ time rsync --dry-run --exclude '*.fucked.up' --itemize-changes -a --stats -h --hard-links --acls --xattrs --one-file-system /mnt/win_sys/ /run/media/barriot/barracuda3t/pendejo/sda2.WD500Gb.win7_C/ === clone sth like the usb key you bootde from === partitions (lsblk) sdc 8:32 1 15G 0 disk ├─sdc1 8:33 1 1G 0 part ├─sdc2 8:34 1 548M 0 part /run/media/lambo/hpboot ├─sdc3 8:35 1 1G 0 part /run/media/lambo/hphome └─sdc4 8:36 1 12.4G 0 part /run/media/lambo/hpsystem then rsync(s) time rsync --dry-run --itemize-changes -a --stats -h /boot/ /run/media/lambo/hpboot/ time rsync --dry-run --itemize-changes -a --stats -h --hard-links --acls --xattrs --one-file-system / /run/media/lambo/hpsystem/ time rsync --dry-run --itemize-changes -a --stats -h /home/ /run/media/lambo/hphome/ tests & edit & run mount --bind /dev /run/media/lambo/hpsystem/dev # same for sys & proc # edit /boot/grub2/grub.cfg for uuids ll /dev/disk/by-uuid/ chroot /run/media/lambo/hpsystem/ # grub2-install /dev/sd?? /dev/sda or /dev/sdb or /dev/sdc usually umount /run/media/lambo/hpsystem/dev umount /run/media/lambo/hpsystem/proc umount /run/media/lambo/hpsystem/sys umount /run/media/lambo/hpsystem/home umount /run/media/lambo/hpsystem/boot umount /run/media/lambo/hpsystem /run/media/lambo/boot # reboot == links == * https://opensource.com/article/19/3/backup-solutions