How to prevent data lost

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 19.01
Operating system and version (eg, Ubuntu 20.04): Ubuntu server 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache2
PHP version (eg, 7.1): &.4

The issue you are facing:
I restarted my server and all my data was gone

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. Restart server
  2. get " no .ocdata file "
  3. Check data folder and find out that evething is gone

The output of your Nextcloud log in Admin > Logging:

GOne

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '****************************************************************************',
  'passwordsalt' => '***************************************',
  'secret' => '**************************************************************,
  'trusted_domains' => 
  array (
    0 => 'sturtz.ml',
  ),
  'datadirectory' => '/*****/*******/****/data',
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'overwrite.cli.url' => 'https://sturtz.ml',
  'dbname' => 'nextcloud',
  'htaccess.RewriteBase' => '/',
  'dbhost' => 'localhost',
  'dbport' => '',
  'simpleSignUpLink.shown' => false,
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*******************',
  'dbpassword' => '************',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'smtp.migadu.com',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'no.reply',
  'mail_domain' => 'sturtz.ml',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '465',
  'mail_smtpname' => 'no.reply@sturtz.ml',
  'mail_smtppassword' => '**********',
  'mail_smtpsecure' => 'ssl',
);









The output of your Apache/nginx/system log in /var/log/____:

Just removed

I had to reinstall but I need to know what i can do to prevent this from happing again

Can someone please help me.

Please read the backup/restore chapters in the administrator guide to get an idea how to prevent data loss.

1 Like

Ok, I will look into that, thanks.