NextCloud: Scan local files into db



  • After rebuilding my NextCloud server, I created my users, groups and such. after finishing this, I used FileZilla to upload the files that I had backed up.

    One problem: They don't show up in the available files for the User/Group. So, how can I fix this without having to delete and re-upload.

    Using the occ Command

    I found the page on using the occ command to be quite helpful, though the path is a tad off for my installation of Ubuntu, no issue though, as once I was in /var/www/html/ the command worked nicely.

    [email protected]:/var/www/html# sudo -u www-data php occ
    

    Will return a nice list of command that can be used

    [email protected]:/var/www/html# sudo -u www-data php occ files:scan
    Please specify the user id to scan, --all to scan for all users or --path=...
    

    Needs an extra switch to process correctly;

    [email protected]:/var/www/html# sudo -u www-data php occ files:scan --all
    Starting scan for user 1 out of 6 (User1)
    Starting scan for user 2 out of 6 (User2)
    Starting scan for user 3 out of 6 (User3)
    Starting scan for user 4 out of 6 (User4)
    Starting scan for user 5 out of 6 (User5)
    Starting scan for user 6 out of 6 (Adminuser)
    +---------+-------+--------------+
    | Folders | Files | Elapsed time |
    +---------+-------+--------------+
    | 16      | 39    | 00:00:00     |
    +---------+-------+--------------+
    

    Files added to the db without having to re-upload them



  • As I was mainly looking to scan files and add them to the db, I didn't look at really any of the other occ command.

    However, you can add,change,delete users via SSH this way also.

    user
      user:add                            adds a user
      user:delete                         deletes the specified user
      user:disable                        disables the specified user
      user:enable                         enables the specified user
      user:info                           show user info
      user:lastseen                       shows when the user was logged in last time
      user:list                           list configured users
      user:report                         shows how many users have access
      user:resetpassword                  Resets the password of the named user
      user:setting                        Read and modify user settings
    


  • I always assumed that occ stood for owncloud command



  • @JaredBusch said in NextCloud: Scan local files into db:

    I always assumed that occ stood for owncloud command

    Me too.



  • Why haven’t Nextcloud change occ to ncc?



  • @black3dynamite said in NextCloud: Scan local files into db:

    Why haven’t Nextcloud change occ to ncc?

    The entire back in has never been changed



  • @black3dynamite said in NextCloud: Scan local files into db:

    Why haven’t Nextcloud change occ to ncc?

    Would break scripts and stuff. Now sure, links, but that gets messy. OCC doesn't cause a problem, keeping it is the right thing.