Backup Container Station

Backup, Restore, Netbak Replicator, Cloud Storage Services
Post Reply
DrumSergio
Getting the hang of things
Posts: 53
Joined: Fri Jan 20, 2017 6:40 am

Backup Container Station

Post by DrumSergio »

Hi there!

I have some docker containers running, one of them the ERP and another, my public webpage.
I wish to not lose all the info that are in them, so, does anyone know where is stored all the info from the containers? So then I can perform a NAS2NAS rsync.

Thank you!
igardpazot
New here
Posts: 2
Joined: Wed Dec 30, 2009 12:19 pm

Re: Backup Container Station

Post by igardpazot »

Also concerned by this topic. Thanks
igardpazot
New here
Posts: 2
Joined: Wed Dec 30, 2009 12:19 pm

Re: Backup Container Station

Post by igardpazot »

I got it

You need to open a putty session. From here
docker ps
docker commit xxxx repository:tag
then thru Qnap container station:
select images et
create a new container fromn the new one.

Hope this will help
DrumSergio
Getting the hang of things
Posts: 53
Joined: Fri Jan 20, 2017 6:40 am

Re: Backup Container Station

Post by DrumSergio »

Hi igardpazot!

Thank you for sharing that way. But we're thinking more on if is it possible to do it via Backup Station, the official app of QNAP.
But anyway, if that's the only option, then it will be needed a cron task run daily in which you first commit the container and then rsync the files generated into another QNAP.

Thank you!
DrumSergio
Getting the hang of things
Posts: 53
Joined: Fri Jan 20, 2017 6:40 am

Re: Backup Container Station

Post by DrumSergio »

Any news about this topic?.. Any easier way?
DrumSergio
Getting the hang of things
Posts: 53
Joined: Fri Jan 20, 2017 6:40 am

Re: Backup Container Station

Post by DrumSergio »

Up
jokies
Know my way around
Posts: 130
Joined: Tue Jul 16, 2013 6:50 pm

Re: Backup Container Station

Post by jokies »

Can't you simply export the container?
Or you can pre-build you config with your base image to make your own image if you want to keep everything clean.
TS-453A with Firmware 4.3.5
Mostly for Containers.
xavierh
Experience counts
Posts: 1118
Joined: Wed Jan 30, 2008 6:15 am
Location: Denton, Texas

Re: Backup Container Station

Post by xavierh »

by default volumes inside a docker container are not exposed to the hosting file system. when you configure your dockers you can chose this route or map file system folders to those defined volumes. since your containers are already running it would be difficult to do this. therefore the option of exporting the docker is your safest bet.

all my dockers (sonarr, radarr, plexpy, unifi contoller) all have mapped volumes to folder sont eh file system which allows me then to access logs and do seamless upgrades (like upgrading the unif controller software)

QNAP TVS-951xQTS 5.0.0.1986 build 20220324 OS Storage Pool: Samsung 860 EVO 250GB SSD x 4 (RAID 5), Data Storage Pool: WD WD30EFRX (Red) 3TB x 4 (RAID 5), 16GB RAM WD Easystore 10TB External USB 3.0 Services: SMB, Appletalk, QPKG: Container Station, HBS 3
QNAP TS-453AQTS 5.0.0.1986 build 20220324 Services: SMB, HBS 3
Network: UDM, UDM Beacon, Unifi 8 Port Switch x 3, Flex Mini Switch, In Wall AP
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: Backup Container Station

Post by Moogle Stiltzkin »

xavierh wrote: Wed Apr 19, 2017 9:09 pm by default volumes inside a docker container are not exposed to the hosting file system. when you configure your dockers you can chose this route or map file system folders to those defined volumes. since your containers are already running it would be difficult to do this. therefore the option of exporting the docker is your safest bet.

all my dockers (sonarr, radarr, plexpy, unifi contoller) all have mapped volumes to folder sont eh file system which allows me then to access logs and do seamless upgrades (like upgrading the unif controller software)
this is what i've been doing lately. setting a persistent storage that binds mount volume to my own share location on the QNAP for use by the containers to store their important data.

I'm new to dockers so plz correct me if i missed out on something.


so to backup my dockers

1. use HBS to backup the persistent storage location i had set

2. using MARS (an app from qnap appcenter), i can then backup container station. The reason for this, i got some settings in container station i need backed up. so this app claims it can backup container station.


So the recovery would be, spin up MARS, to restore container station. Then restore the persistent storage back to their original locations. Start apps if not already started. at this point they should be working?

:'


*update

Multi-Application Recovery Service (MARS) is a comprehensive backup and disaster recovery solution for applications on your QNAP NAS. It allows you to back up and later restore individual applications (such as WordPress, Google Photos and Container Station), and supports multi-version backup and integrated system logs.
what the.... i start app, look around for container station but it's not shown in this app, yet the description claims it can backup container station. What gives? I could not find out how to backup container station with this app :roll:
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Toxic17
Ask me anything
Posts: 6476
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: Backup Container Station

Post by Toxic17 »

Moogle Stiltzkin wrote: Thu Dec 08, 2022 12:58 pm what the.... i start app, look around for container station but it's not shown in this app, yet the description claims it can backup container station. What gives? I could not find out how to backup container station with this app :roll:
Same here. not sure how your backup container station with this app when the option is not there. I guess this product is not finished or we assumed something else. you can always export the container to a NAS shared folder within Container Station and use that as a backup or sorts.
Regards Simon

Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: Backup Container Station

Post by Moogle Stiltzkin »

Toxic17 wrote: Sun Jan 15, 2023 8:42 am
Moogle Stiltzkin wrote: Thu Dec 08, 2022 12:58 pm what the.... i start app, look around for container station but it's not shown in this app, yet the description claims it can backup container station. What gives? I could not find out how to backup container station with this app :roll:
Same here. not sure how your backup container station with this app when the option is not there. I guess this product is not finished or we assumed something else. you can always export the container to a NAS shared folder within Container Station and use that as a backup or sorts.
i was using the cs v3 which is beta.

so becauz i wasn't using cs v2, i couldn't be sure that maybe it did work, but only for v2. i did not confirm this so was hoping others who did could comment xd.

so what i did instead for backing up my docker apps, is merely to (some more detail to what i mentioned previously)

1. use a folder location in a share, which i use to save all my docker configs when deploying docker compose.
2. backup that folder.

then for restoration in the event of reinitializing the nas from scratch

3. setup your nas as per usual
4. restore the docker configs where they were before
5. install container station, then install portainer (you don't have to use portainer, but this is what i'm using) using a docker compose that points the config file to the restored docker config location for portainer
6. from portainer, because we restored our backups, our portainer settings is all retained, INCLUDING the saved docker compose files. Which is why i always save the docker compose in custom templates in portainer. So to restore, i just deploy the apps from my custom templates.
7. at this point the dockers are all restored, and just test everything is working



So anyway the crucial point here is to use persistent storage location for the docker configs, and this is what needs to be backup :D i use hbs to backup and restore for this purpose.
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
Qmann
Easy as a breeze
Posts: 302
Joined: Mon Jun 08, 2020 8:09 am
Location: USA

Re: Backup Container Station

Post by Qmann »

CS2 you can simply export it in the app, but I am unclear on which one you would want for a full recovery. Exporting both are about the same size on the exported file.

From the help:

Export Image:
The Docker command "docker save" will pack the layers and metadata of all the chain in the image. You can then load this "saved" images chain into another Docker instance and create containers from these images.

Export Container:
The Docker command "docker export" saves basic settings of a container including "Entrypoint", "Auto Start", "CPU Limit", "Memory Limit" and some advanced settings including "Environment", "Network", "Devices" to the exported file. It also saves the changes in the container. We recommend stopping the container before exporting it to avoid potential data loss.

I *think* that since I store all my data in a persistent file location that is backed up with borg backup, I don't need to fuss with any of this exporting. I can destroy my docker and simply load it back up which will see my persistent volumes.
Model: TVS-872XT 64GB (Crucial 64GB Kit CT2K32G4SFD8266)
2 x 1TB XPG 1TB NVMe (ASX8200PNP-1TT-C) [RAID-1]
5 x 16TB EXOS [RAID-5]
Borg Backup running to an offisite pi, AND to the local TS-569L
Model: TS-569L Borg server for backups
6 x 8TB Ironwolf [RAID-5]
Qotom-Q355G4 Fanless Mini Micro PC running pSense in front of everything
haproxy for anything inside the LAN
Post Reply

Return to “Backup & Restore”