Last active
September 26, 2017 17:06
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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