Skip to main content


Move storage from Friendica server to local NAS?


!Friendica Admins

I have come up with an issue of filling up my server. I have no more space.

How can I move my storage form my VM to a local NAS?

Can some one guide me along this path?

Thanks for any help!

Joseph

Friendica Admins reshared this.

in reply to Joseph Hogan

When you haven't changed any storage settings, then most data is stored in the database. There the best way to save data is to optimize the tables. But for performing this command you also need some free space. Also in the admin settings in the "performance" settings you should disable the caching of avatars. That will save space.
in reply to Joseph Hogan

@Michael Vogel

Thanks for the idea.

I just tried reaching this page, and the page turns blank. I can see the various pages friendica, but when I click on the admin page, nothing at all is displayed.

Why might this be?

How to get to admin to change this setting?

What else can I cleanup to remove space?

Thanks for ideas. Stuck:)

Friendica Admins reshared this.

in reply to Joseph Hogan

A blank page is an indicator for some error. You have to check the error logs (php error log and friendica error log) via console.
in reply to Joseph Hogan

Thanks @Michael Vogel

Can you remind me where to locate the PHP and friendica logs?

Which directories?

I'll be back with what I find.

Joseph

Friendica Admins reshared this.

in reply to Joseph Hogan

It depends on your installation where these files are located.
in reply to Joseph Hogan

@Michael Vogel

We were able to clear the cache, and things started working again.

I turned off the avatar caching.

The other thing that you mention: optimize the DB. Can you give more details onhow it is done, or is there a tutorial on this somewhere?

Thanks

Joseph

Friendica Admins reshared this.

in reply to Joseph Hogan

@Michael Vogel

Thanks for pointing this out.


We were looking at the logs and it seems to be very large(14GB). Can we safely erase it?

Thanks
Joseph

Friendica Admins reshared this.

in reply to Joseph Hogan

You can easily delete old log files. Best is to use logrotate to do this automatically.
in reply to Joseph Hogan

@Michael Vogel

Back again, sorry:(

The person working with me, more linux savvy than me, does not know how to use the logrotate command. Can you let us know how, or maybe you know of a good reference page?

I presume it moves the old log to a new file, and the log file is empty again?

Thanks

Friendica Admins reshared this.

in reply to Joseph Hogan

See for example here: https://www.tecmint.com/install-logrotate-to-manage-log-rotation-in-linux/

My config file looks like this: (if you don't use the daemon, you don't need the postrotate and pastrotate commands)

/path/to/log/friendica.log {
        rotate 2
        daily
        missingok
        compress
        delaycompress
        #notifempty
        create 660 user group
        postrotate
                su ike -c "/path/to/docs/bin/daemon.php start"
        endscript
        prerotate
                su ike -c "/path/to/docs/bin/daemon.php stop"
        endscript
}
in reply to Joseph Hogan

@Michael Vogel

OK, we were able to figure out how to work logrotate

As far as time, how many days should we keep in the logs? 1 week? 1 month? Other? I know that there might be ideal, but there is reality for space constraints. Thanks for suggestions.

WE also need a size factor, since after about 3 months, I have 14GB of logs.

Thanks

Friendica Admins reshared this.

in reply to Joseph Hogan

It's totally up to you, how long you want to keep it. I only hold the entries for 3 days and rotate once per day. But that is mostly caused due the fact that my system generates around 3.5 gig of log data per day.