Data won't fit in backup disk
I have lots of data on /mnt/data1. I want to copy it all to a partition on an external hard disk. Both partitions are the same size and I am almost sure they were formatted with the exact same parameters (ext4). But I am using rsync and running out of space on the target file system before the copy is done.
Some info on the issue: Code:
# df -h Code:
# rsync -aHxvz --delete-before /mnt/data1/* /media/backup/ Now some info on the file systems themselves: Code:
Filesystem volume name: data1 Code:
Filesystem volume name: backup |
You can do several things: the first is to back up all files on your drive and then change the size on you other partition. Or you can get a bigger backup media.
|
You're saying that the target partition must be larger than the source partition?
So you're saying that data is naturally expected to swell during a file copy operation, thus not fit into a file system that is the exact same size as the file system it's coming from? Can you please describe in interesting detail why or how exactly such swelling occurs? That is just the kind of information I need. |
In your rsync command, you might need to use the "-S" (--sparse) option to handle sparse files efficiently and not expand them on the destination. Note that doing so will not convert files already expanded on the destination to their sparse equivalent.
|
I have solved this issue. I had done something stupid, like
# rsync -aHxv --delete-before /mnt/data1 /media/backup/ which creates a "data1" directory inside /media/backup/, then I must have aborted and run something like # rsync -aHxv --delete-before /mnt/data1/* /media/backup/ which will copy all of /mnt/data1/* directly into the root of /media/backup/, which is different from the first command line I had tried. So I kind of sort of tried to fit the whole shebang from the source partition TWICE into the target partition. Of course it wouldn't fit. Thank you, rknichols, for the tip regarding the -S option. My backup script never used that option, should do henceforth. |
All times are GMT -5. The time now is 03:04 PM. |