Skip to content

Instantly share code, notes, and snippets.

@misraX
Last active September 26, 2017 17:06
Show Gist options
  • Save misraX/d878818db99111cbe65fd23b1f3c23c1 to your computer and use it in GitHub Desktop.
Save misraX/d878818db99111cbe65fd23b1f3c23c1 to your computer and use it in GitHub Desktop.
Backing up && syncing files from Linux Filesystem ex.(ext4) to Windows Filesystem (ntfs)
#!/bin/bash
username=name
PATH_TO_EXCLUDED_FILE=/home/$username/exlude.txt
BACKUP_PATH=/mnt/VOLUME/FOLDER
pacman -Qqe > $HOME/pkglist.txt
rsync -rltDvu --modify-window=1 --progress --delete --delete-excluded --exclude-from=$PATH_TO_EXCLUDED_FILE /home /$BACKUP_PATH
# Restoring pacman
# sudo pacman -S - < $PATHTOPKGLIST/pkglist.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment