@pilou
if you don’t mind i will write all the steps you should do to my opinion in one list, you can chose of course what is the best for you,
1. boot to your secondary debian,
2. make a folder “Yunohost Drive Backup”
3. open disks (program)
if it’s not installed, it can be installed by the command:
sudo apt-get install gnome-disk-utility
because we are going to create a backup for Yunohost partition we have to make sure
yunohost drive are not mounted / dismounted,
once we open “Disks” we need to unmount the SSD drive,
(that can be achieved by command line but to my opinion through GUI it is better)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- open apart-gtk
please be aware to that apart-gtk can’t make a backup for system partition once it being
loaded on the system itself, that’s why a secondary OS is important,
once you open apart-gtk look for your SSD partition at the left pane, and click “clone”
that should be “sda” (check the drive size on top to make sure)
change the compression type to gzip
chose your backup folder for yunohost on your desktop:
then, click on “Create Image”
that will set a backup of your whole yunohost drive, in case things ever goes bad, its a gzip file you can always open it with an ordinary any zip/gzip program and take any file you desire, in case you need to restore the whole drive, you can open apart-gtk, mark your drive on the left pane, chose your file and click restore, it will restore the whole drive.
go to your backup folder on the desktop
and change the file name to something like “a fresh yunohost + domain and no apps”
-
boot to yunohost
-
install some useful tools:
A. sudo apt-get install pip
B. pip install glances[all]
that will install glances which is better than htop,
to run it, simply type glances.
to exit CTRL+X
i recommend also to install midnight commander which it has FTP and file browsing in old
style like norton commander,
C. sudo apt-get install mc
to run it, simply type mc.
to exit F10 / CTRL+C / CTRL+X
-
Nextcloud needs your Harddrive to be mounted automatically,
so before you do any changes for auto mount please make a backup to fstab file,
sudo cp /etc/fstab /etc/fstab.backup
list all drives UUID command: (to check what’s the “Home” / “Save” UUID)
sudo blkid
copy your HOME or SAVE (whatever you chose for nextcloud) UUID
and paste it into your fstab file to make it auto mountable,
sudo nano /etc/fstab
it should looks like this: (with your own UUID) and of course your partition name sdb1 or whatever is it, i think its sdb3
Reboot your yunohost server,
and check if the drive being mounted, if something goes wrong check your settings or follow the yunohost instructions about automount,
when you successfully done auto mounting the desired partition
install nextcloud
install “external storage app”
make settings for your external storage,
make a backup of your nextcloud with yunohost admin panel
update the system and upgrade if any,
when you done
go back to your debian secondary OS, and make a backup again of your yunohost partition at the same folder,
but this time give it a name “Yunohost backup + nextcloud - ready” or something that you will know that backup is full with nextcloud,
now, if you’re asking me i don’t know if its a good idea to restore the old yunohost backup you have made before, because, there might some errors and sicknesses what will come into the new server, also, the last backup you have made was after your config.php was ruined,
so i suggest you to just stay with the new nextcloud and restart all from scratch,
your data is there, thats what is important,
in case you want to rescan files there is a command you can use,
here: click CTRL+F on your browser and look for “scan”
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
general recommendations:
it is a good practice to set a static ip for your server,
if for example your router’s dhcp is on class C which is something like: 192.168.x.x
set your server to static ip so it will never change, that is important for port forwarding and convenience,
how to set a static ip:
sudo nano /etc/network/interfaces
in your case all these lines under static ip is not exists,
comment out the line:
iface “yourcard” inet dhcp
then add:
STATIC IP
iface “yourcard” inet static
address 192.168.1.30 (or whatever you like to be your yunohost ip on your router)
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
take in account that should be to your situation, if your routers gateway is 192.168.1.1 as mine so its all fit your situation if not do it according to your router. if you still dont know ask me,
thats it, save the file CTRL + S and reboot,
check if you got your ip with ifconfig
and check if the server can go out,
ping 1.1.1.1
don’t forget to set your port for forwarding to your server address on your router,
after that click diagnose to check if everything is alright,
remember to perform a backup from time to time for nextcloud on admin panel and after might 3 month its a good idea to create a partition backup with apart-gtk or 6 months depends on you,
keep the boot-repair disk on your second debian OS it can fix boot problems if you ever have,
the most important, is check if you upload anything through nextcloud it not uploading it to your SSD and its uploading t to the hard drive instead,
another general recommendation:
check your processor temperature from time to time maybe every 6 months,
in such computer cases the Fan ribs get to be blocked by dust quiet quick,
you can do this on your bios or by a program,