Optimal file system type and mount options for an rsnapshot dedicated drive
Posted
by
Nimmy Lebby
on Server Fault
See other posts from Server Fault
or by Nimmy Lebby
Published on 2010-12-25T19:54:57Z
Indexed on
2010/12/25
20:55 UTC
Read the original article
Hit count: 387
We have an external USB 2 drive that we are using as a backup drive for our configuration. We use rsnapshot for the backups. It uses a few standard commands for managing snapshots:
rm -rf
: deletes expired snapshotsmv
: moves older snapshots down a slotcp -al
: duplicates last snapshot to new slotrsync -a --delete --numeric-ids --relative
: synchronizes new snapshot
As you could see by the log below, the majority of the time is spent on the rm -rf
and the cp -al
steps:
[25/Dec/2010:14:00:02] rsnapshot hourly: started
[25/Dec/2010:14:00:02] echo 21012 > /var/run/rsnapshot.pid
[25/Dec/2010:14:00:02] rm -rf /mnt/extdrive/snapshots/hourly.5/
[25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.4/ /mnt/extdrive/snapshots/hourly.5/
[25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.3/ /mnt/extdrive/snapshots/hourly.4/
[25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.2/ /mnt/extdrive/snapshots/hourly.3/
[25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.1/ /mnt/extdrive/snapshots/hourly.2/
[25/Dec/2010:14:15:48] cp -al /mnt/extdrive/snapshots/hourly.0 /mnt/extdrive/snapshots/hourly.1
[25/Dec/2010:14:23:32] rsync -a --delete --numeric-ids --relative /etc /mnt/extdrive/snapshots/hourly.0/sm4/
[25/Dec/2010:14:23:52] touch /mnt/extdrive/snapshots/hourly.0/
[25/Dec/2010:14:23:52] rm -f /var/run/rsnapshot.pid
[25/Dec/2010:14:23:52] rsnapshot hourly: completed successfully
My questions:
I'm currently using ext4 for the filesystem. Maybe this is not the best choice from those available in Red Hat. Anyone have any recommendations that would speed up the process?
The partition's mount options are
sync,dirsync 1 2
. Is there a way to optimize this since it's solely used for rsnapshot? Of course, reasoning would be greatly appreciated.
© Server Fault or respective owner