Professional Documents
Culture Documents
Backup Using Rsync To NTFS
Backup Using Rsync To NTFS
t=820425
ubuntuforums.org
Rsync basically can check the destination data and see if any
changes have been made in the source data so that ONLY the
source data that has been changed is updated. VERY useful.
Code:
mkdir /media/harddrive/backup
So, now we are going to be making the backup bash script. I prefer
making a script as the command is quite long. First we need to
make a folder to store the script in (so it is easier to access).
Then we must create the bash script:
Code:
1 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
cd bash
gedit backupBIG.sh
Code:
#!/bin/bash
Explanation of commands:
rsync:this is the program used to sync the data. Rsync basically
can check the destination data and see if any changes have been
made in the source data so that ONLY the source data that has been
changed is updated. VERY useful.
-r: copies directories recursively
--delete: this is important. Basically rsync syncs files that have been
changed. But what if you delete a file from the source directory?
This command deletes it from your backed up hard drive as well.
2 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
Code:
gedit /home/bob/Bash/BackupBigExclude.txt
Now in the text editor it is ENTIRELY upto you what you want to
exlcude.
This is my list:
Code:
/home/bob/MyDownloads
/home/bob/.VirtualBox
/lost+found
/media
/mnt
/proc
/sys
/tmp
3 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
Suffice to say these commands are quite technical, but they all work
for me. Notice nowhere here do I tell it to preserve permissions as
these will not work if you are copying to an ntfs system.
Code:
cd /home/bob/Bash
sh BackupBig.sh
This should run the backup, it may take a long time depending on
how much data you have.
NB: Make sure you take care when changing any settings. If
you are unsure please ask. In fact don't even change the
location without first confirming.
4 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
Thanks for the suggestion, but like I have already mentioned, this is
SPECIFICALLY for backing upto NTFS, which will NOT support
permissions. When I backup to my EXT3 I simply use -a (which
includes most of the useful flags).
I am not sure, but I am using it with '-a and -z' for archive and
compress mode to NTFS (mounted trough smbmount) and I think
permissions are preserved as I recovered '/etc/apache2' at Sunday.
Here are my comand:
Code:
5 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
--exclude=/cdrom/ --exclude=/mnt/
--exclude=/proc/ --exclude=/root/.thumbnails/
--exclude=/root/.Trash/ --exclude=/sys/
--exclude=/home/ --exclude=/tmp/ --delete-
excluded -avzlp / /media/XP/BACK_SYSTEM
6 de 7 08/09/2016 09:44
Backup using Rsync to NTFS about:reader?url=https://ubuntuforums.org/showthread.php?t=820425
7 de 7 08/09/2016 09:44