My unupgraded 5x got borked and I'm not sure what to do - SOLVED

Hi all,

Not my proudest moment. I’ve got a mail in a box for a long while, used as a secondary mail and for nextcloud, for the last 6 years or so.

I’ve pretty much didn’t do anything with it other than run updates from time to time for the last 2 years. No need to lecture. I knew I should upgrade and stay “on it”, but life happened.

Anyway, the thing is, I can’t ssh into my server (get a ssh: Could not resolve hostname [name of server]: Name or service not known) and my admin page isn’t available and I’m pretty lost as to what to do next.

Worst case scenario I’d want to save what’s possible and spin a new box, but if this is saveable by anyway I would appreciate the help.

It might be obvious, but I’m not very knowledgeable about servers. Spun this box up by following instructions…

thanks!

Please check your box with your VPS provider. Maybe there has been an IP address change. Then ssh to the box and run mailinabox. Maybe your VPS provider terminated the instance if it is a free tier?
Be more specific why you are not able to ssh?

my vps provider is digital ocean. It’s not a free tier. It seems to be working when I’m in the digital ocean interface.

I’ll try and figure the ip in there. As I said, I’m a bit in the dark…

I was able to ssh to the box. Just run “mailinabox”? anything else?

I’m not sure why the ssh to my domain doesn’t work…

What I do notice now that I’m in the box, is that my drive is full.
image

Ssh >> run mailinabox.
There are instructions after the setup to go to the admin page via the IP.
Go there and see what is going on in the Admin >> Status page. Maybe there is something wrong with your domain registrar. You remember where you registered your domain. Maybe the glue records and the NS records are broken with the register. But navigating with the IP address whould work for you to reach the admin page.

Ok, not having space seems to be part of the issue…

image

How do I free space? I’m sure I can free space, if I know what’s safe to delete…

I know I’ve set up backups years ago. Is deleting them safe? where are they stored?

Can you attach another drive to the instance on digital ocean? Otherwise download the backup via ftp. The backup has a secreat_key.txt only a root user can copy.

See if most of the disk space is taken by

/home/user-data/

du -sh *

Then copy to the new drive (which is larger than your current one)

sudo cp -rp /home/user-data/backup >> to the newly attached storage.

Then delete the /home/user-data/backupthis will free up a lot of space and you will be able to work. sudo rm -rf /home/user-data/backup
Play with df du commands to identify what has eaten up your disk.

Another approach is to ftp to your box. Download Filezilla if you are on PC and sftp to the IP of the box using the username and the keyfile for your ssh or whatever you use via ssh.

Then go to /home/user-data/backup
/home/user-data/owncloud-backup
Download. It will not let you download the secret key, just skip. Cat the content of the secreat key via ssh. or via ssh sudo nano the secret_key.txt and copy paste to your pc LEFT/RIGHT click to select copy and then paste to your pc.
Go to ssh and delete as per above the backup.

Resize the DO volume.

1 Like

Is there a problem if I just delete these backups? I mean, if I don’t intend to use them. I just need my box working so I can upgrade it safely…

I always find having a good clear out of /var/log and var/log/journal gives me sufficient headroom when I need a bit of space without risking anything that I might need - assuming I’m not investigating a technical issue and just need the space.

1 Like

sudo apt-get clean

sudo journalctl --vacuum-time=2d

1 Like

My /var/log doesn’t seem to contain much…

sudo du -a /home | sort -n -r | head -n 5

The directory size is in bytes

Also have a look in
/home/user-data/owncloud/

Maybe you have big files there.

image

seems the problem is user-data and backup

@eladhen Your total disk space is 25GB, these days this seems insufficient for selfhosted mailbox and cloud storage. Consider any of the following> resizing your disk adding more space.
Follow the steps above to download or copy the backup to free up space.

  1. You can also download the real mailbox from /home/user-data/mail/elad…

Terminate the instance and
Make a new instance with Ubuntu 22 and a larger volume, and install the latest MIAB.

Then copy the /home/user-data/mail/elad… to the new instance.

Of course do reserve the public IP from your old instance and reassign the IP to the new instance with the latest MIAB.

Ok, I deleted the backups and now mail in a box is running. Now it seems the problem stems from my domain provider.
This are some of the errors in my system check:

Public DNS (nsd4) is not running (port 53).
Nameserver glue records are incorrect. The ns1.box.[name].com and ns2.box.[name].com nameservers must be configured at your domain name registrar as having the IP address [my ip]. They currently report addresses of [Not Set]/[Not Set]. It may take several hours for public DNS to update after a change.
This domain must resolve to your box's IP address (my ip) in public DNS but it currently resolves to [Not Set]. It may take several hours for public DNS to update after a change. This problem may result from other issues listed above.

I’m not exactly sure what needs to be done…

Ok, fixed that in my domain provider. My box is running again! hurray!

Thank you all for all the help. This community rocks. And I’m also reminded again how cool MiaB is.

As for the space needed: I really don’t need so much space. I have no problem deleting old mails in this mail, and the nextcloud is mostly for little syncs, not for tonnes of data.

But I’ll consider getting a bigger instance. Thinking about it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.