Comment on When using rsync to backup my /home folder to an external 1TB SSD, I run out of space, how??

confusedpuppy@lemmy.dbzer0.com ⁨13⁩ ⁨hours⁩ ago

There might be a possibility that recursion is happening and a directory is looping into itself and filling up your storage.

I have some suggestions for your command to help make a more consistent experience with rsync.

1: –dry-run (-n) is great for troubleshooting issues. It performs a fake transfer so you can sort issues before moving any data. Remove this option when you are confident about making changes.

2: –verbose --human-readable (-vh) will give you visual feedback so you can see what is happening. Combine this with --dry-run so you get a full picture of what rsync will attempt to do before any changes are made.

3: –compress (-z) might not be suitable for this specific job, as I understand, it’s meant to compress data during a file transfer intended over a network. In your commands current state, it’s just adding extra processing power which might not be useful for a connected device.

4: If you are transferring directories/folders, I found more consistent behaviour from rsync by adding a trailing slash at the end of a path. For example use “/home/username/folder_name/” and not “/home/username/folder_name”. I’ve run into recursion issues by not using a trailing slash.

Don’t use a trailing slash if you are transferring a single file. That distinction helps me to understand what I’m transferring too.

5: –delete will make sure your source folder and destination folder are a 1:1 match. Any files deleted in the source folder will be deleted in the destination folder. If you want to keep any and all added files in your destination folder, this option can be ignored.

–archive (-a) and –partial --progress (-P) are both good and don’t need to be changed or removed.

If you do happen to be running into a recursion issue that’s filling up your storage, you may need to look into using the –exclude option to exclude the problem folder.

source
Sort:hotnewtop