ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    NextCloud: Scan local files into db

    IT Discussion
    nextcloud add files to db occ
    4
    7
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by

      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.

      root@TuDallasNC:/var/www/html# sudo -u www-data php occ
      

      Will return a nice list of command that can be used

      root@TuDallasNC:/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;

      root@TuDallasNC:/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

      1 Reply Last reply Reply Quote 0
      • gjacobseG
        gjacobse
        last edited by

        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
        
        1 Reply Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch
          last edited by

          I always assumed that occ stood for owncloud command

          scottalanmillerS 1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller @JaredBusch
            last edited by

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

            I always assumed that occ stood for owncloud command

            Me too.

            1 Reply Last reply Reply Quote 0
            • black3dynamiteB
              black3dynamite
              last edited by

              Why haven’t Nextcloud change occ to ncc?

              JaredBuschJ scottalanmillerS 2 Replies Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @black3dynamite
                last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @black3dynamite
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post