5

I'm using the Ubuntu pre-installed Backups software, with Ubuntu 16.04 for Desktop (but perhaps the same issue was on older Ubuntu also).

enter image description here

Each time it starts (once a day) it consumes 100% of cpu for several minutes. Since I was thinking that a backup software should be silent and invisible, this is quite annoying.

enter image description here

Would be ok if it takes four or five times more than the time it takes now to do its things, but consuming less cpu and being more quiet.

Is there a silent mode for the Backups software or a better alternative backup software for Ubuntu?

andrew.46
  • 39,359
Andrea
  • 1,077

2 Answers2

3

Honestly, I've never heard of the program you're using.

I personally prefer rsnapshot (http://rsnapshot.org/) for my backup needs. The Ubuntu package is the same name.

Since it uses hardlinks, the first time it runs may use a lot of CPU time, but afterwards, it won't. (Especially if you have few files that change between backups -- which is the case for most people.) Likewise, it won't use much diskspace over time.

Having said that, I schedule backups in the middle of the night. So other than when I'm testing the configuration file, I don't really have a chance to notice the CPU time. This is unrelated to whether or not you are running this on a server; rsnapshot can be run on the command line. Or, you can create a short-cut on your desktop to it.

Another suggestion is to just renice the program so that it runs at a lower priority. If you need to do this automatically, then some short bash programming will be needed. See, for example, https://talk.maemo.org/showthread.php?t=36870 or just search for the phrase "automatic renice".

Off the top of my head, I don't know how to do it, but my guess is that you would have to:

  • write a bash script that finds out the process ID
  • run renice on it
  • put this script in a cronjob and either make it run right after your backup starts or have it run repeatedly (i.e., every hour)

I guess the script might look like this, but you really need to clean this up as it's really off the top of my head:

 #!/bin/bash
 PID=`ps -ef | grep "<program name>" | grep -v "grep" | tr -s ' ' | cut -f 2 -d ' '  | head -n 1`
 renice -10 ${PID}

The PID line does this in order:

  1. Gets a list of processes.
  2. Searches for .
  3. Removes any line that has both and "grep".
  4. Replace consecutive spaces into a single space.
  5. Grab the second column's values using space as a delimiter.
  6. Take the first line.

Hope this helps get you started!

Ray
  • 2,200
1

Ubuntu Backup a.k.a. DejaDup uses duplicity as the backend. There was a bug in duplicity in 2014 that was fixed that caused this. It still happens though, so you could report another bug in duplicity. This bug only affects one physical core, so the computer should still be responsive on multi-CPU machines. Otherwise you may consider the various other backup alternatives, or have your computer backup when you're not using it.

You could also try a larger blocksize?

duplicity --max-blocksize 4096 [full/incremental] src dest

   --max-blocksize number
          determines the number of the blocks examined for changes during the diff process.  For files < 1MB
          the blocksize is a constant of 512.  For files over 1MB the size is given by:
      file_blocksize = int((file_len / (2000 * 512)) * 512)
      return min(file_blocksize, globals.max_blocksize)

      where globals.max_blocksize defaults to 2048.  If you specify a larger max_blocksize, your difftar
      files will be larger, but your sigtar files will be smaller.  If you specify a smaller max_blocksize,
      the reverse occurs.  The --max-blocksize option should be in multiples of 512.

Jonathan
  • 3,984