[Plugin] CA Appdata Backup / Restore v2


Squid

Recommended Posts

On 6/19/2019 at 6:25 PM, manolodf said:

Yes correct, same thing, but I guess I was looking more for the specific command if possible to extract just one folder (to keep permissions as mentioned)

 

Sorry for the late reply, but in case you haven't been using your google-fu the exact command is 

tar -xvf example.tar FolderName/

This will extract the folder named "FolderName" and all it's content to the directory you're currently in.

Link to comment

Hi all,

I'm hoping I can get some guidance on a problem I'm having.  I have CA Backup/Restore scheduled to run at 3am every day.  When it runs, 7 of my 8 containers start up afterward, but one does not start.  The log for that container just indicates that it was shut down at 3am, but I see no indication that it tried to start again.  I've tried adding a few 'extra parameters' like '--restart unless-stopped' and '--restart -always' but the behavior does not change (likely by design given my limited understanding of how those parameters work).  I've also tried installing the User Scripts plugin and creating a daily script that will just run 'docker start SABnzbd' but it's failing due to an issue mounting an SMB location that I have connected to the container.  Ideally I'd prefer to do this without a script since I don't think it should be needed, however, I'm not sure what I can look at to determine why that one container isn't starting after the backup completes.

 

I'm wondering if there is a log file for this plugin so I can see if there was some kind of problem starting the container after the backup completed.  Any guidance you all can offer would be appreciated.  I've attached the bit of logging from when the container is shut down, but I don't think it's going to be very helpful.

sab-docker.txt

Link to comment

As I have been getting unraid ready to migrate my synology, I setup this plugin and tested it saving to the array.  Works perfectly.  However now that I'm going to start really using the system I want the backups to be on a device that is accessible in the event of a the boot drive going bad.  I reconfigured my destination to be a usb stick (setup as an unassigned device).  I ran a backup and everything was successful.  Then I noticed that if I unmount the disk and run a backup it does not generate any errors.  Anyway to get notified if the destination is not available?

 

Notification setting is set to "Errors Only"

Link to comment
2 hours ago, pvr02 said:

Then I noticed that if I unmount the disk and run a backup it does not generate any errors.  Anyway to get notified if the destination is not available?

That's because the destination IS still available, according to the system. When the drive is unmounted, the files will be created anyway, only instead of going to the drive, they are going to RAM. That's because Unraid runs entirely from a RAM disk created during boot time.

 

This is a sticky situation, and without extra scripted steps is not easily solvable.

 

Something I have not tried, but may work, is to set the UD stick to be shared on the network, and point the backup to the network location instead of the local disk mount point. That way when the disk is unmounted, the network share is gone as well.

Link to comment

I too am in the camp trying to restore individual dockers. I tried untaring manually but because of softlinks, things get messed up. I know I can selectively untar folder via cli but I was hoping there is an easier way.

Edited by bobbintb
Link to comment
  • 2 weeks later...

would it be possible to have the same way of backup you use for the appdata for the USB/Flash drive ?
meaning that the USB drive also get archived ?
0 compression wouldn't be a real issue,
this way we got multiple backups of it

Link to comment
  • 2 weeks later...

I started getting errors from my cache drive today and wanted to back it up just in case. I found the CA appdata backup program and attempted to install it but keep getting a mkdir error. I am running 3.7.2 unraid. I can install everything else but this one won't work. Any suggestions?

Backup Plugin error.png

diagnostics-20190802-0341.zip

Edited by themightygeckoe
Added diagnostics zip file.
Link to comment
Aug  1 14:48:11 BriServer kernel: FAT-fs (sda1): error, corrupted directory (invalid entries)
Aug  1 14:48:11 BriServer kernel: FAT-fs (sda1): Filesystem has been set read-only
Aug  1 14:48:11 BriServer kernel: FAT-fs (sda1): FAT read failed (blocknr 342)

Shutdown, toss the flash into another computer and run checkdisk on it.

Link to comment
7 hours ago, themightygeckoe said:

Added diagnostics to original post.

If you edit a previous post, your thread doesn't show up as having anything new in it. So it might be overlooked. Since you actually made a new post anyway, then we did notice it. Something to consider when using the forum. That is why I said

11 hours ago, trurl said:

attach ... to your NEXT post

 

 

Link to comment

Well, I just had a cache SSD die, and am in the process of recovering. The restore process went fine, but when I added my previous apps, they ALL got set to auto start, and my staggered delays were all gone, set to 0.

 

Where is that information stored? I can certainly recreate it, and the start order was maintained, but I have a bunch of containers that are started only when I need them, and it would be nice if the auto start state and delay were saved as well.

 

Thanks for this plugin @Squid, it really saved the day.

Link to comment

Autostart & delays are stored within the docker.img file (/var/lib/docker/unraid-autostart)

 

CA when installing previous apps always sets everything to autostart as the assumption is that more often than not a user will want the app to start up automatically instead of being manual start.  IE: Its how I want the system to work by default - any installation is set to autostart by default, and to not have it do that you then have to turn it off rather than the other way around.

Link to comment
  • 3 weeks later...

I just noticed the other day that my backups stopped working with the process having been hung for two months.  I rebooted Unraid, manually initiated a backup, and it still hung on backing up notifications.  I'll try removing the boot drive from the backup and try again, but it really needs some way to notify users if the process is ongoing for far too long (e.g. two months ;p )

 

Here's where it gets stuck, with the 'Abort' button doing nothing:

Screenshot_20190824-161803.thumb.png.bd26557b14dc78db639d1d2b693d97d0.png

 

Here are my settings:

Screenshot_20190824-162145.thumb.png.bdd23a31c136e91d5b100c5a7cdd5ba8.png

 

Cheers!

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