sheoreo.blogg.se

Grsync export as rsync script
Grsync export as rsync script











grsync export as rsync script
  1. GRSYNC EXPORT AS RSYNC SCRIPT INSTALL
  2. GRSYNC EXPORT AS RSYNC SCRIPT FULL
  3. GRSYNC EXPORT AS RSYNC SCRIPT WINDOWS

  • Sync files and directories listed in a file:.
  • Note that when transferring files only, the directory name has to be provided in the destination path. Rsync -a ~/Pictures/2001-*.jpg /mnt/drive2/Pictures
  • Sync a group of specific files in a directory:.
  • Rsync -a ~/Pictures/Group-photo-2001-A.jpg /mnt/drive2/Pictures This creates a backup in /mnt/drive2/Pictures/ Rsync -a -progress -delete ~/Pictures /mnt/drive2
  • Sync directories and if any were deleted in ~/Pictures, also delete it in /mnt/drive2/Pictures/:.
  • This creates a backup of your photos from the two directories in /mnt/drive2/Pictures/ Rsync -av ~/Pictures ~/Images /mnt/drive2
  • Back-up (push) two directory source to a single directory on the second drive:.
  • Note that rsync destinations acts just like the cp and rcp commands.Īlso note that rsync -av ~/Pictures/ /mnt/drive2/ has a different behavior from rsync -av ~/Pictures /mnt/drive2 This will result in /mnt/drive2/Pictures/Pictures/ Rsync -av ~/Pictures /mnt/drive2/Pictures : Do not include the source directory name in the destination. Note: The drive name will be dependent on the manufacturer. When you add new photos, just re-execute this rsync command to backup the latest changes. This creates a backup of your photos in /mnt/drive2/Pictures/īack-up to a USB thumb drive is similar: rsync -av ~/Pictures /media/KINGSTON
  • Back-up (push) your photo directories to a second drive:.
  • Synchronize directory paths each of which are accessible to a single system. You may just play around with folders you want to include/exclude, for some people saving /home folder does matter.Rsync command format: rsync source-path destination-path

    GRSYNC EXPORT AS RSYNC SCRIPT FULL

    You generally don't want to backup the full /home folder, most of the times you'll only need your dot files (usually that's /home/ yourname/.config).

    grsync export as rsync script

    Sudo rsync -aAXv -delete -exclude=/home/* -exclude=/dev/* -exclude=/proc/* -exclude=/sys/* -exclude=/tmp/* -exclude=/run/* -exclude=/mnt/* -exclude=/media/* -exclude="swapfile" -exclude="lost+found" -exclude=".cache" -exclude="Downloads" -exclude=".VirtualBoxVMs" -exclude=".ecryptfs" /run/media/minime/backup / Then, if I need to restore this backup, simply reverse the backup and destination folder, so it goes: Sudo rsync -aAXv -delete -exclude=/home/* -exclude=/dev/* -exclude=/proc/* -exclude=/sys/* -exclude=/tmp/* -exclude=/run/* -exclude=/mnt/* -exclude=/media/* -exclude="swapfile" -exclude="lost+found" -exclude=".cache" -exclude="Downloads" -exclude=".VirtualBoxVMs" -exclude=".ecryptfs" / /run/media/minime/backup Usage is pretty easy:Ĭhoose the partition/device where you want to store the backup (in my case it's /run/media/minime/backup, which is an external ssd) and the initial folder you want to backup (usually it's just /, 'root folder')Ĭhoose the files you want to backup (or rather, files you want to exclude from backing up), then run something like this with sudo: Basically it's just a copy-paste app, which copies your system files somewhere (I copy them to an external usb-ssd). I really like rsync for its ease and intuitiveness. which is just about stakeholder relationships at the end of the day. it does rely a lot on end-users ensuring data stays in `$HOME` or applications use their default storage, and devs keep to LFS. This will give you a running Windows/Apple laptop in 30-60 minutes(encrypted drives take forever) and a running linux image in minutes. Restore the data, probably with config management tool, some times just with a bootstrap script and rsync (dotfiles) Pull the config project and run it (this will pull the relative backup data from XYZ, XYZ being s3, Dropbox, google cloud storage, apple cloud,nfs,zfs), this sets up packages you care about, and then configures the applications, users, ACLs, etc

    GRSYNC EXPORT AS RSYNC SCRIPT INSTALL

    Install a decent package manager (windows chocolatey and osx brew) some times this can be part of the next step but i call it out cos it makes everything easier. Install git if it needs it (chicken and egg, git to get the config so you are using standard process curl will do tbh) Reset the os (deploy a new ami, arm template, run the bootloader etc)

    GRSYNC EXPORT AS RSYNC SCRIPT WINDOWS

    my current process for OSX, windows and linux. A lot of the time it's quicker to rebuild even a laptop than to restore it, regardless of OS, the packages or the data. Then back up data not the distro and it's components. Pick a distro and be aware of the version number, then config manages the items you care about, and if you care about their dependencies those too, if you care a lot manage their version numbers too. I have a system that as become the norm for everything i've worked with developed over time looking after user end compute, bring your own devices and managing server side application stacks.













    Grsync export as rsync script