How to Move the BOINC Data Directory (Linux)

Move your Linux machine’s BOINC data directory like this:

1. sudo service boinc-client stop
2. sudo mv /var/lib/boinc-client/* /path_to_new_dir/boinc-client/
3. sudo rm -rf /var/lib/boinc-client
4. sudo ln -s /path_to_new_dir/boinc-client /var/lib/boinc-client
5. sudo service boinc-client start

Works like a charm.

 


Comments

How to Move the BOINC Data Directory (Linux) — 12 Comments

    • No. After following the above steps do an expanded list of /var/lib looking for boinc, thusly:
      ls -ail /var/lib | grep boinc

      You get one line that is a symbolic link, thus:
      131903 lrwxrwxrwx 1 root root 23 Oct 23 11:46 boinc-client -> /home/boinc-working-dir
      This points all access to /var/lib/boinc-client to the new location of the working-dir, in my case in /home
      Check for the existence of the latter, that it is populated, and everything in it is owned by BOINC:BOINC.

      • Also doesn’t work for me. The directory has been moved; the link is in place; I can list all the files from the symlink; permissions on the target directory, as well as all files in the target directory, appear to be the same as before moving.

        # sudo systemctl status boinc-client.service
        Output excerpt:
        BOINC data directory ‘/var/lib/boinc-client’ does not exist.

      • OK, totally user error on my part! I had the symlink created as boinc_client instead of boinc-client. Renamed the symlink and all is well. 🙂

  1. Doesn’t seem to work for me either.
    I’ve followed the instructions and made sure all the permissions are fine, but I still get this when doing sudo systemctl status boinc-client.service:
    ● boinc-client.service – Berkeley Open Infrastructure Network Computing Client
    Loaded: loaded (/lib/systemd/system/boinc-client.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-02-17 12:26:58 CET; 12s ago
    Process: 26230 ExecStopPost=/bin/rm -f /var/lib/boinc-client/lockfile (code=exited, status=0/SUCCESS)
    Process: 26227 ExecStart=/bin/sh -c /usr/bin/boinc –dir /var/lib/boinc-client >/var/log/boinc.log 2>/var/log/boincerr.log (code=exited, status=1/FAILURE)
    Process: 26226 ExecStartPre=/bin/chown boinc:boinc /var/log/boinc.log /var/log/boincerr.log (code=exited, status=0/SUCCESS)
    Process: 26225 ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log (code=exited, status=0/SUCCESS)
    Main PID: 26227 (code=exited, status=1/FAILURE)

    I’ve tracked it down to the cd command failing, if I do:
    sudo runuser -l boinc “cd /var/lib/boinc-client”
    I get: runuser: warning: cannot change directory to /var/lib/boinc-client: Permission denied

    I have now idea how to fix it. I created an empty directory with boinc:boinc as the owner, but the cd command still fails.

  2. I know it’s been 2 years, but I have the same problem – it doesn’t work. It seems that systemd doesn’t want to access /home at all. I couldn’t override it, even with the “ProtectHome=false” option.

    Workaround: Download boinc from the project page, it doesn’t even need installation. Run it, and the boinc data dir will be within the downloaded/extracted dir. You can move it anywhere.

    Cheers,
    Richard

  3. You can use “–dir” argument to manually set the working directory of BOINC. To do that, simply move the working directory to a new path and update the systemd service to reflect the updated path by adding the –dir argument.

    (In my case, I disabled boinc-client and used the rc-local compatibility service to achieve this, becuase I am still not good at using systemd and I didn not want to screw it up by any chance..)

Leave a Reply

Your email address will not be published.