rsync vs midnight commander

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dhenzler
Level 2
Level 2
Posts: 63
Joined: Sat Aug 20, 2016 1:27 pm
Location: Newport NC
Contact:

rsync vs midnight commander

Post by dhenzler »

I just finished backing up Nextcloud using rsync to a USB drive using Nextcloud's recommended technique

Code: Select all

rsync -Aax nextcloud/ nextcloud-dirbkp_`date +"%Y%m%d"`/
This took MANY hours to complete. Probably around 8 or there abouts. After completing this and looking at the contents with midnight commander, I wondered why I couldn't just back up what I wanted using midnight commander itself. I ran a little test and discovered the transfer rate started out at 110MB/sec but dropped down to 22MB/sec after about 10 minutes. Perhaps it would continue to drop... why?

Anyway... is there some magic in the use of rsync or would ol midnight commander have done just fine.

Backing up the MySQL database failed using the Nextcloud example.

Code: Select all

mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
it kept insisting my hostname was incorrect. yet PHPmyAdmin shows localhost as the host So I have a bit more to do. Oh bother...

Dave
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MintBean

Re: rsync vs midnight commander

Post by MintBean »

There could be a couple reasons why Rsync slowed down.
1) The speed initially was artificial - the speed to fill Linux' write buffer. Long term the speed decreases to the true write speed of the USB once the buffer is full.
2) USB is slow at writing lots of little files. If the transfer hits a lot of little files it will slow down compared to what it was when copying large files.

The 'magic' of Rsync is that it's incremental. Next time you sync it will only copy files that have changed since the last sync and so should be much faster. A plain copy with a file manager doesn't offer that.
WharfRat

Re: rsync vs midnight commander

Post by WharfRat »

MintBean wrote:The 'magic' of Rsync is that it's incremental. Next time you sync it will only copy files that have changed since the last sync and so should be much faster.
I don't think that's going to happen with the date tacked on to the destination :?

The rest I agree with :wink:
greywolf
Level 1
Level 1
Posts: 30
Joined: Thu Sep 19, 2013 7:20 pm

Re: rsync vs midnight commander

Post by greywolf »

If you want to use time stamped incremental backups that utilize 'rsync' as the tool; I suggest you try 'rsnapshot'. It is an excellent little backup program:

"Description-en: local and remote filesystem snapshot utility
rsnapshot is an rsync-based filesystem snapshot utility. It can take
incremental backups of local and remote filesystems for any number of
machines. rsnapshot makes extensive use of hard links, so disk space is
only used when absolutely necessary."

There are MANY backup options in the repos to suit a variety of needs. Some OP research may be in order.

cheers,
greywolf.
It is about the Dragons - it was always about the Dragons!
MintBean

Re: rsync vs midnight commander

Post by MintBean »

WharfRat wrote:
MintBean wrote:The 'magic' of Rsync is that it's incremental. Next time you sync it will only copy files that have changed since the last sync and so should be much faster.
I don't think that's going to happen with the date tacked on to the destination :?

The rest I agree with :wink:
Whoops! Indeed. In that case I don't really see the point.
Locked

Return to “Software & Applications”