Jump to content

Raspberry pi cloud server: Help!

Ok, you guys may be my last hope. I'm trying to set up a home cloud server for my dad using a raspberry pi model 3B+. I wouldn't call myself super good at Linux, but I do know a little more than the average PC user. I've had success setting up the server using this guide: 

 

https://pimylifeup.com/raspberry-pi-nextcloud-server/#comments

 

But here's the kicker: my dad wanted a backup, so I've set up a 2-drive RAID 1 using a hard drive toaster with that functionality. But for the life of me, I just can't figure out how to get Nextcloud to use the RAID to store files rather than just the micro SD card used to boot. 

 

As I said, I'm a big fat NOOB, so any help would be greatly appreciated! Let me know if you need any command line copies. 

 

Thank you!!! 

 

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, frysauce01 said:

my dad wanted a backup, so I've set up a 2-drive RAID 1 u

RAID is not a backup. You need a backup, not raid here.

 

Just use something like rsync to make a inceremtal backup of your data.

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Electronics Wizardy said:

RAID is not a backup. You need a backup, not raid here.

 

Just use something like rsync to make a inceremtal backup of your data.

If they're duplicating the information from their dad's computer to the RAID array then aren't they "backing up" their information?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, imreloadin said:

If they're duplicating the information from their dad's computer to the RAID array then aren't they "backing up" their information?

no, as the raid won't protect you from thing like file system corruption, power surges,  or user error.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

no, as the raid won't protect you from thing like file system corruption, power surges,  or user error. 

So if periodically duplicating your data to external drives (whether they're in a RAID array or not) doesn't constitute a backup then what does?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, imreloadin said:

So if periodically duplicating your data to external drives (whether they're in a RAID array or not) doesn't constitute a backup then what does?

Backing up to a external drive is fine, but op wanted to move it to a raid array. A raid array alone isn't a backup

 

Look up 321 rule. You want copies off site aswell for a good soltion.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Electronics Wizardy said:

Backing up to a external drive is fine, but op wanted to move it to a raid array. A raid array alone isn't a backup

I think he's saying the external drive is going have RAID 1, not that he's taking the initial storage, adding some drives to make a RAID 1 mirror, and calling it a backup. Still 2 separate systems in play here (If I understood correctly)

 

Though it is worth noting that depending on how critical the data is, it might still be worth just looking for a remote cloud backup solution. You could have the most redundant amazing system to backup to, but if it's still roughly the same location as the main system you're still boned in the case of fire or other local disaster.

 

EDIT: also you might have more luck in https://linustechtips.com/main/forum/84-servers-and-nas/ 
Not that a lot of programmers aren't fluent in *nix (thouigh i'll admit it's not one of MY strengths), but this seems to fit better there.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

there is a step by step tutorial on how to change the data directory in the link you posted?!

 

Did you try that out?

One thing i could imagine not working correctly is when you copied over the original data folder you copied only the content and not the whole folder, so you didn't copied over the permissions of the folder. check with an ls -rtlh the permissions of the folder on the raid drive if it is not www-data:www-data  nextcloud wouldn't be able write to it

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Electronics Wizardy said:

RAID is not a backup. You need a backup, not raid here.

 

Just use something like rsync to make a inceremtal backup of your data.

This is true. Sorry for the inaccuracy. More specifically, my dad wanted to avoid loss of data via hard drive failure. :)

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, frysauce01 said:

This is true. Sorry for the inaccuracy. More specifically, my dad wanted to avoid loss of data via hard drive failure. :)

so do you want to move the data or make a new nextcloud on the external drive?

 

probably the easiest way is to just mount the hdd at the storage directory and rsync the data over.

 

Also you do still want a backup.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Helibert said:

there is a step by step tutorial on how to change the data directory in the link you posted?!

 

Did you try that out?

One thing i could imagine not working correctly is when you copied over the original data folder you copied only the content and not the whole folder, so you didn't copied over the permissions of the folder. check with an ls -rtlh the permissions of the folder on the raid drive if it is not www-data:www-data  nextcloud wouldn't be able write to it

I'll give this a try. I did see his instructions on moving the directory, and like I said, I'm a bit of a noob when it comes to Linux. So I imagine I did something wrong here. I'll definitely try your suggestion though! 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Electronics Wizardy said:

so do you want to move the data or make a new nextcloud on the external drive?

 

probably the easiest way is to just mount the hdd at the storage directory and rsync the data over.

 

Also you do still want a backup.

The goal is to get nextcloud to write to the RAID rather than to the SD card. The original article mentions a way to do this, but is a little more vague for a noob to understand. :/

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, frysauce01 said:

The goal is to get nextcloud to write to the RAID rather than to the SD card. The original article mentions a way to do this, but is a little more vague for a noob to understand. :/

Then Id just rsync the data dir over to the hdd and mount the hdd at the data point. That way you won't have to touch the nextcloud config at all.

Link to comment
Share on other sites

Link to post
Share on other sites

On 10/16/2018 at 4:07 PM, Helibert said:

there is a step by step tutorial on how to change the data directory in the link you posted?!

 

Did you try that out?

One thing i could imagine not working correctly is when you copied over the original data folder you copied only the content and not the whole folder, so you didn't copied over the permissions of the folder. check with an ls -rtlh the permissions of the folder on the raid drive if it is not www-data:www-data  nextcloud wouldn't be able write to it

So I believe permissions are the issue. I was able to get nextcloud to write to the RAID briefly when I changed the permissions of '/media/pi/RAID1/nextcloud/data' to "Anyone" using the file manager. It gave me about 10 minutes of joy until nextcloud started presenting the following error: "your data directory is readable by other users please change the permissions to 0770 so that the directory cannot be listed by other users." it seems no matter how many times I use the chown and chmod commands, nothing works. Any ideas? 

Link to comment
Share on other sites

Link to post
Share on other sites

Never used nextcloud so i am shooting blind:

what owner does the data have that you got to put in within the 10 minutes?

what owner does your '/media/pi/RAID1/nextcloud/data'   '/media/pi/RAID1/nextcloud/' and  '/media/pi/RAID1/' have?

did you use sudo to chown the 0770 ?

what filesystem is the raid in? ntfs or ext?  i believe on ntfs it is not possible to change the permissions with chown you would have to mount the raid with a fstab entry

what does your /etc/fstab  ( open it with a editor like nano vim joe) say?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×