Results 1 to 3 of 3
I have a script that I'm trying to use to backup my hard drive every night. The full backups are working flawlessly. I haven't figured out the incrementals yet. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-03-2010 #1
- Join Date
- Feb 2008
tar incremental help
I have a script that I'm trying to use to backup my hard drive every night. The full backups are working flawlessly. I haven't figured out the incrementals yet. I thought they were working when I first wrote the script a few weeks ago, but it doesn't seem to be working anymore.
I have a long script that I have a whole bunch of statements like this...
sudo tar -z --create \
--file=/media/Backup/$(date +%y%m%d)_$(date +%H%M%S)_Pictures_Backup.tgz \
To be honest, I'm not a Linux expert and I was really surprised when I started this venture that Linux filing system doesn't have an archive bit like NTFS does and we have to use a file to store the archiving information. But there's the file at /var/log/usr.snar. My theory is I just leave that file for a week so I can create one full and incrementals through the week. Then when I want to create another full backup (when I swap hard drives), I then delete that usr.snar file. I thought that worked a few weeks ago, but it doesn't anymore. When I start my backups, they backup every folder I have listed and not just the files that changed. My full backups are 165 GB, so I'd like to use the incremental feature.
- 12-03-2010 #2I was really surprised when I started this venture that Linux filing system doesn't have an archive bit like NTFS does and we have to use a file to store the archiving information.
But Linux has several file systems, not just Ext3 and Ext4. For instance, there is ZFS or Btrfs which can create snapshots, which's kind of incremental backup.
Another way to create incremental backups would be to use a tool like rsync. I wouldn't use tar for that. For some more information on backup strategies have a look at: Refining Linux: Thoughts on data security
There are many tools out there and you should use one of them instead of building your own if you don't exactly know what your're doing. The linked article explains some basics of data security and how most backup tools work.Refining Linux Advent calendar: “24 Outstanding ZSH Gems”
- 12-04-2010 #3
I agree. rsync is the tool for this job, written to do exactly what you want.