For backing up data in my office I use a Raspberry Pi model B (I had a spare one) running rsnapshot. Basically, every night it copies data from a bunch of smb mounted folders to a couple of external hard drives (fuseblk).
I gradually added data to back up and recently the whole process became really slow: it takes something like 15 hrs to perform the entire operation.
This is the log of a copy (only on one disk):
[07/Nov/2018:21:16:05] /usr/bin/rsnapshot -c /etc/rsnapshot.conf Daily: started [07/Nov/2018:21:16:05] echo 28378 > /var/run/rsnapshot.pid [07/Nov/2018:21:16:08] /bin/rm -rf /mnt/Disk1/Backup/Daily.4/ [07/Nov/2018:23:31:33] mv /mnt/Disk1/Backup/Daily.3/ /mnt/Disk1/Backup/Daily.4/ [07/Nov/2018:23:31:33] mv /mnt/Disk1/Backup/Daily.2/ /mnt/Disk1/Backup/Daily.3/ [07/Nov/2018:23:31:33] mv /mnt/Disk1/Backup/Daily.1/ /mnt/Disk1/Backup/Daily.2/ [07/Nov/2018:23:31:33] /bin/cp -al /mnt/Disk1/Backup/Daily.0 /mnt/Disk1/Backup/Daily.1 [08/Nov/2018:02:17:45] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld01 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:43:28] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld02 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:46:29] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld03 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:54:05] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld04 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:54:48] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld05 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:54:49] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld06 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:02:54:49] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld07 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:00:10] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld08 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:25:57] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld09 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:25:57] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld10 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:28:42] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld11 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:53:39] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld12 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:03:58:05] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld13 /mnt/Disk1/Backup/Daily.0/./ [08/Nov/2018:04:00:24] touch /mnt/Disk1/Backup/Daily.0/ [08/Nov/2018:04:00:24] rm -f /var/run/rsnapshot.pid [08/Nov/2018:04:00:24] /usr/bin/rsnapshot -c /etc/rsnapshot.conf Daily: completed successfully Now, I know that the RPi is not fast, nor are the external drives. Still, the problems seem to be here
[07/Nov/2018:21:16:08] /bin/rm -rf /mnt/Disk1/Backup/Dayly.4/ and especially here
[07/Nov/2018:23:31:33] /bin/cp -al /mnt/Disk1/Backup/Dayly.0 /mnt/Disk1/Backup/Daily.1 Keep in mind that I have probably tens of thousands of files (I'm counting them as I write but I don't know how long it will take). (EDIT: there are 250k files in ~30 GB of space)
Any idea on what could be the problem and if/how I could solve it?
While I'm here, I have no clue on the --relative [...] --no-relative option on the rsync command. I honestly don't remember how I came to it, it's been some time since I configured it. Given that I need to save the tree, should I just use relative? Or is it ok this way, since it works?
-=* UPDATE *=-
I did as I was suggested and formatted as ext4 the usb drives. This is the log after the operation:
[16/Nov/2018:21:16:04] /usr/bin/rsnapshot -c /etc/rsnapshot.conf Daily: started [16/Nov/2018:21:16:04] echo 19966 > /var/run/rsnapshot.pid [16/Nov/2018:21:16:04] /bin/rm -rf /mnt/Disk1/Backup/Daily.4/ [16/Nov/2018:21:18:52] mv /mnt/Disk1/Backup/Daily.3/ /mnt/Disk1/Backup/Daily.4/ [16/Nov/2018:21:18:52] mv /mnt/Disk1/Backup/Daily.2/ /mnt/Disk1/Backup/Daily.3/ [16/Nov/2018:21:18:52] mv /mnt/Disk1/Backup/Daily.1/ /mnt/Disk1/Backup/Daily.2/ [16/Nov/2018:21:18:52] /bin/cp -al /mnt/Disk1/Backup/Daily.0 /mnt/Disk1/Backup/Daily.1 [16/Nov/2018:21:22:25] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld01 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:19] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld02 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:27] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld03 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:41] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld04 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:44] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld05 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:44] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld06 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:24:45] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld07 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:25:04] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld08 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:26:04] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld09 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:26:04] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld10 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:26:20] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld11 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:26:58] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld12 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:28:54] /usr/bin/rsync -a --stats --relative --delete --no-relative /mnt/Backup/Fld13 /mnt/Disk1/Backup/Daily.0/./ [16/Nov/2018:21:30:03] touch /mnt/Disk1/Backup/Daily.0/ [16/Nov/2018:21:30:03] rm -f /var/run/rsnapshot.pid [16/Nov/2018:21:30:03] /usr/bin/rsnapshot -c /etc/rsnapshot.conf Daily: completed successfully As you can see the overall time was drastically reduced: 15 mins vs. ~7hrs.
Thank you all, I'm honestly impressed.
The only doubt I have left is about what was discussed in the comments: I believe that rsync does an incremental copy, even if it sees the smb source folders as local. Some of these folders contain 10k+ files (probably even more, I can't check in this very moment) and there's just no way that all of these are copied in just, say, 2 minutes.
cpandrsync? why not usersynconly to make your backups? You can use rsync to make daily, weekly, monthly backups. Then there is no need torm --recursiveneither, saving you lots of time...