Bulk load to restore lost data quickly

dhenzler

Explorer
Joined
Sep 24, 2019
Messages
57
I'm working on doing bulk load of files. Have lost my cloud twice now... drive failures. Takes 2 simultaneously...
Found a good bit of help on the Internet, but it's only worked for NextCloud install on my Linux desktop. Fortunately I did this... 11,307 files would have been toast. I loaded my data dir with the files, then ran this:

Worked like a charm.

Haven't been able to make it work on FreeNAS NC yet ? Something's different.
Valuable tool...
1605065586336.png


Doesn't work inside FreeNAS why?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe because sudo is not there?

Can you show the command you used from the jail console and the error resulting?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So you can't run it like that from the host.

You first need to be in the jail.

iocage console pj

Then you can try it.
 

dhenzler

Explorer
Joined
Sep 24, 2019
Messages
57
So you can't run it like that from the host.

You first need to be in the jail.

iocage console pj

Then you can try it.
if you look carefully I AM IN THE JAIL... it's the first thing in the line of text...
1605240106625.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
if you look carefully I AM IN THE JAIL
Shouting doesn't make you right.

You have done a cd into the jail path, but the process you're running isn't jailed, it's on the host.

Why I know you're not:
root@smlnas#
This part is a dead giveaway... if you were in the jail, that would be:
root@pj#

Also, this part of the path can't exist if you're in the jail, since as far as the jail is concerned the world starts at that point:
...jails/pj/root/

If you do what I suggested, you will have a shell process that is jailed and can interact with the jail as you're intending. (although I can't tell you if the command you're attempting will work as I don't have my nextcloud in a jail)
 

dhenzler

Explorer
Joined
Sep 24, 2019
Messages
57
Shouting doesn't make you right.

You have done a cd into the jail path, but the process you're running isn't jailed, it's on the host.

Why I know you're not:
root@smlnas#
This part is a dead giveaway... if you were in the jail, that would be:
root@pj#

Also, this part of the path can't exist if you're in the jail, since as far as the jail is concerned the world starts at that point:
...jails/pj/root/

If you do what I suggested, you will have a shell process that is jailed and can interact with the jail as you're intending. (although I can't tell you if the command you're attempting will work as I don't have my nextcloud in a jail)
Got it... Had an unusual response to getting "in". But can see the difference. Now I'll try to bring in the files again...
Thank You.
 

dhenzler

Explorer
Joined
Sep 24, 2019
Messages
57
Got it... Had an unusual response to getting "in". But can see the difference. Now I'll try to bring in the files again...
Thank You.

This is my last try including iterations in an attempt to get it right:

root@smlnas[...jails/pj/root/usr/local/www/nextcloud]# iocage console pj
Last login: Fri Nov 13 06:28:55 on pts/2
FreeBSD 11.3-RELEASE-p11 (FreeNAS.amd64) #0 r325575+fb17f3e15b8(HEAD): Tue Jul 28 11:09:10 EDT 2020

root@pj:~ # sudo -u www php console.php files:scan --all
sudo: Command not found.
root@pj:~ # www php console.php files:scan --all
www: Command not found.
root@pj:~ # sudo -u www php console.php files:scan --all
sudo: Command not found.
root@pj:~ # php console.php files:scan --all
Could not open input file: console.php
root@pj:~ # console.php files:scan --all
console.php: Command not found.
root@pj:~ # files:scan --all
files:scan: Command not found.
root@pj:~ #

no dice ! Something's missing in FreeNAS NextCloud plugin
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
This is my last try including iterations in an attempt to get it right:

root@smlnas[...jails/pj/root/usr/local/www/nextcloud]# iocage console pj
Last login: Fri Nov 13 06:28:55 on pts/2
FreeBSD 11.3-RELEASE-p11 (FreeNAS.amd64) #0 r325575+fb17f3e15b8(HEAD): Tue Jul 28 11:09:10 EDT 2020

root@pj:~ # sudo -u www php console.php files:scan --all
sudo: Command not found.
root@pj:~ # www php console.php files:scan --all
www: Command not found.
root@pj:~ # sudo -u www php console.php files:scan --all
sudo: Command not found.
root@pj:~ # php console.php files:scan --all
Could not open input file: console.php
root@pj:~ # console.php files:scan --all
console.php: Command not found.
root@pj:~ # files:scan --all
files:scan: Command not found.
root@pj:~ #

no dice ! Something's missing in FreeNAS NextCloud plugin

Have you tried
Code:
occ files:scan --all
from within the jail shell?

Worked fine for me

1607956237516.png
 
Last edited:

dhenzler

Explorer
Joined
Sep 24, 2019
Messages
57
Actually got it figured out... a while ago now. I didn't realize that sudo was necessary, and it wasn't loaded... so after installing sudo, and following the instructions it worked great. I've enjoyed being able to bulk load to build my cloud's usefulness. I still have problems when trying to upload large files... get screwed up reassembling.

As my skill and confidence level increases I will attempt to fix that. The system report tells me what I need to do.

Thanks for the info...
 
Top