[Plugin] CA Appdata Backup / Restore v2


Squid

Recommended Posts

On 1/19/2020 at 1:11 PM, ICDeadPpl said:

If you want, you can try my script I've made exactly for this purpose.
https://github.com/ICDeadPpl/UnraidScripts/blob/master/backup-appdata-usb-vm.sh
It backs up the folders in your appdata location separately. It also backs up the USB flash drive and the libvirt.img file.
I have it running on a schedule on my Unraid.

Was just checking your script out.  It works but if you don't already have the BACKUP_DEST_APP folder already created it never backs anything up due to the location not being writable.  You may want to do a check for it or at least output an error.  The other two work find since you are always creating them.

  • Like 1
Link to comment
2 hours ago, ChronoStriker1 said:

Was just checking your script out.  It works but if you don't already have the BACKUP_DEST_APP folder already created it never backs anything up due to the location not being writable.  You may want to do a check for it or at least output an error.  The other two work find since you are always creating them.

I added error message for missing directory.
Thanks for the input! 

Link to comment

I messed up my appdata and need to do a restore from backup. I have a question though my backed up version was from Unraid 6.7.2 and then 2 days later I updated to 6.8.2 which its currently at. If I do the restore from the latest one I have (6.7.2) will that still work or will something else be changed that doesn't need to be. I just need the appdata to be restored as everything else is functioning. 

 

Thanks in advance.

Link to comment
On 2/16/2020 at 1:55 PM, Squid said:

image.thumb.png.a3fca751b8f5bebec2f818ff8bde0ecd.png

 

And enter this in


/usr/local/emhttp/plugins/dynamix/scripts/mover

 

Oddly, I don't have that directory on my server.  I'm running 6.8.2

I'm also not sure what you're suggesting I do.

Edited by rcrh
Link to comment
2 hours ago, DZMM said:

Feature Request:  Can we add paths to pre and post processing scripts from User Scripts in the future please e.g. 


/boot/config/plugins/user.scripts/scripts/CA-Backup_Stop/script

which doesn't work at the moment. Thanks

You want to type in

/bin/bash /boot/config/plugins/user.scripts/scripts/CA-Backup_Stop/script

Yours doesn't work because unRaid doesn't allow direct execution of scripts from the flash drive.

 

  • Like 1
Link to comment

few questions,

 

CA backup v1  it would create a dated subfolder with the appdata + usb backed up as a subfolder inside it.

CA v2 it creates the "[email protected]" subfolder for the appdata, so thats all the same.

But, the usb+vm backups have their own location which are not using a dated subfolder.

 

Is there a setting to have it also use a dated subfolder for the vm/usb backup locations?

or make the vm/usb backups be part of the appdata dated subfolder (like v1 did)?

 

also is there any control over how files+folders are named?

for example, if i wanted to have it denote what version of unraid was being used when it was created. since a backup x days ago doesnt provide that context really.

 

Edited by zoggy
Link to comment
7 minutes ago, zoggy said:

Is there a setting to have it also use a dated subfolder for the vm/usb backup locations?

 

I have been very patiently waiting for a new feature of unRaid (currently alpha testing) that will allow me to completely remove the entire USB backup feature.  As it stands now, it is effectively deprecated in lieu of grabbing your own flash backup via the UI, except for the fact that CA Backup does it automatically on a schedule.  

 

  • Thanks 1
Link to comment

I've noticed that if I do a manual backup it will stop and start my dockers just fine. When it auto does it, all my dockers restart but one. Is there a log I can dig through to see what CA backup v2 is doing?

 

Also I noticed that CA backup v2 does NOT start the dockers in the same order (honor the ordering) that unraid does.

It should be starting mariadb before kodi-server:

Searching for updates to docker applications
Starting duplicati
Starting kodi-server
Starting mariadb
Backup/Restore Complete. tar Return Value: 0
Backup / Restore Completed

 

Link to comment
2 hours ago, zoggy said:

When it auto does it, all my dockers restart but one. Is there a log I can dig through to see what CA backup v2 is doing?

It would be the container logs as to why it's not starting.  But it may be related to the order if it's directly referencing another container.  I'll look at it.

Link to comment

Is there a way to just backup the flash drive?  The appdata is (supposedly) getting backed up by crash plan.  But The flash drive can no longer via crash plan.

So I'd like to use this to just back up the flash drive (then crash plan will backup the backup).  I don't really want to stop all the dockers every time I want to back up the flash drive?

Link to comment
On 3/8/2020 at 4:35 PM, zoggy said:

I've noticed that if I do a manual backup it will stop and start my dockers just fine. When it auto does it, all my dockers restart but one. Is there a log I can dig through to see what CA backup v2 is doing?

 

Also I noticed that CA backup v2 does NOT start the dockers in the same order (honor the ordering) that unraid does.

It should be starting mariadb before kodi-server:


Searching for updates to docker applications
Starting duplicati
Starting kodi-server
Starting mariadb
Backup/Restore Complete. tar Return Value: 0
Backup / Restore Completed

 

It isn't by any chance Plex that doesn't restart is it?

Mine always used to but recently doesn't auto restart even though it does just fine manually. Only docker it doesn't restart.

Link to comment
44 minutes ago, thebaldconvict said:

It isn't by any chance Plex that doesn't restart is it?

Mine always used to but recently doesn't auto restart even though it does just fine manually. Only docker it doesn't restart.

nope, I only have three dockers as listed above.

The one that doesnt start with ca backup is kodi-server. Nothing shows up in logs to let me know why however.

Its a kodi headless docker I added from docker hub - https://hub.docker.com/r/celedhrim/kodi-server/

Link to comment
2 hours ago, zoggy said:

nope, I only have three dockers as listed above.

The one that doesnt start with ca backup is kodi-server. Nothing shows up in logs to let me know why however.

Its a kodi headless docker I added from docker hub - https://hub.docker.com/r/celedhrim/kodi-server/

I get no reasons in the logs either that I can see. 

I'm using the standard Linuxserver Plex docker. 

It is strange as the problem only started a few weeks ago having worked fine for ages.

Link to comment

Hi have a question I  try too restor my appdata  but cant find " CA's Previous Apps section"
just me there don't know where too look ?

Quote

 Re-add your previously installed docker applications via CA's Previous Apps section. No adjustment of the templates should be necessary

 

Link to comment
39 minutes ago, Squid said:
 

Apps Tab.  Previous Apps link along the left side of it's page

Thx fond it, weirdly enough it just say   No Matching Applications Found.
Are it for I was need too make a fress install of unraid on my USB ?

Edited by tola5
Link to comment
7 minutes ago, tola5 said:

Thx fond it, weirdly enough it just say   No Matching Applications Found.
Are it for I was need too make a fress install of unraid on my USB ?

Did you make a fresh install?  If so, the files that it looks for are gone, unless you have a backup or the original stick (they are the contents of /config/plugins/dockerMan/templates-user on the flash drive

Link to comment
8 minutes ago, Squid said:

Did you make a fresh install?  If so, the files that it looks for are gone, unless you have a backup or the original stick (they are the contents of /config/plugins/dockerMan/templates-user on the flash drive

oh ok it explane thx for the help any way :)

Link to comment
2 hours ago, ptr727 said:

Hi, I have a VM where I map config paths to appdata.

How can I stop and restart the VM similar to how docker containers are managed?

You would have to use the appropriate command line too stop / start the VM within a custom start / stop script.

Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.