Community discussions

MikroTik App
 
MircoADM
just joined
Topic Author
Posts: 16
Joined: Sun Nov 21, 2021 8:40 pm

Backup and restore Containers

Thu Sep 12, 2024 10:37 pm

Hello,

is there a (official) method to backup and restore containers from the ARM-device?
I have a running container on my L009UiGS-2HaxD for something "IoT tasks"(based on Debian bookworm),
python3 is has more power then mikrotik scripting.

Thins container is stored on a external usb-drive in the folder usb1-part1/container/container1
I can backup the whole folder with scp / rsync (i have the rose storage package also installed).
But when i try to restore this container with scp oder rsync, the recovered container could not startup.
In Winbox the folder shows as "container store" on file category. This restored folder / container do not start up.

I think the file-attributes are the problem.
Routeros ignores all attributes while backup / restore the files.
Rsync says "some attributes are not set..."
Has anyone backup a container and restore it on a another drive(for example) and can STARTUP the restored one?

Greets
 
holvoetn
Forum Guru
Forum Guru
Posts: 6873
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Backup and restore Containers

Fri Sep 13, 2024 9:29 am

Valid question and I am curious too for the solution.

Have you already launched a ticket towards support ?
They should be able to tell how it needs to be done.
 
User avatar
marsbeetle
newbie
Posts: 48
Joined: Sun Feb 19, 2023 9:57 am

Re: Backup and restore Containers

Fri Sep 13, 2024 9:33 am

Has anyone backup a container and restore it on a another drive(for example) and can STARTUP the restored one?
I bought 2 x USB3 Sandisk Ultra 128GB and occasionally backup the data from one USB drive to the other. I've also used the backup when Mikrotik has not shutdown the container properly and caused a problem with the file system where it no longer mounts. Easier to replace using the backup which saves time while you fix the problematic drive.

You can mount the USB drive on any Linux system and copy the data across to the backup, making sure to preserve any file and folder permissions. Persistent data you should be able to backup directly from your Mikrotik, if the container is configured correctly. This way you should not need regular backups unless you update the container.
 
MircoADM
just joined
Topic Author
Posts: 16
Joined: Sun Nov 21, 2021 8:40 pm

Re: Backup and restore Containers

Fri Sep 13, 2024 3:13 pm

Valid question and I am curious too for the solution.

Have you already launched a ticket towards support ?
They should be able to tell how it needs to be done.
Nope!
For the moment i use this containers only as a "playground".
For scenarios with a relevant use case, i need a functional backup / restore solution.
I have enough IoT alternatives like raspberry PI / orange PI / nano PI etc.
My little MT router(L009UiGS-2HaxD) is in the moment with container a "nice toy"
Users with "big one" MTs(like CCR2004-16G-2S+ and upper) e.g. work in a data center have a more necessary working case
So my hope was that ticket is already in the queue from that kind of users.
 
MircoADM
just joined
Topic Author
Posts: 16
Joined: Sun Nov 21, 2021 8:40 pm

Re: Backup and restore Containers

Fri Sep 13, 2024 3:18 pm

Has anyone backup a container and restore it on a another drive(for example) and can STARTUP the restored one?
I bought 2 x USB3 Sandisk Ultra 128GB and occasionally backup the data from one USB drive to the other. I've also used the backup when Mikrotik has not shutdown the container properly and caused a problem with the file system where it no longer mounts. Easier to replace using the backup which saves time while you fix the problematic drive.

You can mount the USB drive on any Linux system and copy the data across to the backup, making sure to preserve any file and folder permissions. Persistent data you should be able to backup directly from your Mikrotik, if the container is configured correctly. This way you should not need regular backups unless you update the container.
Thanks for the suggestion. I already knew about this solution. In my opinion, this is only a workaround.
I need ab functional backup / restore from a MT-device direct.
On remote use cases i can not plug the usb-drives to a linux box so i must work with the MT-device only :D

Greets