[Plugin] CA Appdata Backup / Restore v2


Squid

Recommended Posts

On 10/24/2018 at 12:54 AM, Diggewuff said:

The plugin seems to ignore the defined docker startup sequence and waiting times of unRaid 6.6's new docker administration utility. Instead it starts the containers in alphabetical order and therefore starts some of my containers before the databases witch they depend on. 

I’m still dealing with that issue. At the moment i had to disable automatic backups. Is there maybe a similarity?

  • Upvote 1
Link to comment
Just now, aragorn18 said:

root@Tower:~# cat /var/lib/docker/unraid-autostart
binhex-nzbhydra2
binhex-plexpass
binhex-radarr
binhex-sabnzbd
binhex-sonarr
Netdata
ombi
organizr

And you are running unRaid 6.6.x and v2018.11.17a of the plugin?

Link to comment
16 minutes ago, aragorn18 said:

Unraid 6.6.5. I have confirmed that the docker containers are definitely not running. They do start up when I manually start them though.

 

Here are all of the CA Backup/Restore messages from my syslog from last night:

 

    Line 2960: Dec  2 05:00:01 Tower CA Backup/Restore: #######################################
    Line 2961: Dec  2 05:00:01 Tower CA Backup/Restore: Community Applications appData Backup
    Line 2962: Dec  2 05:00:01 Tower CA Backup/Restore: Applications will be unavailable during
    Line 2963: Dec  2 05:00:01 Tower CA Backup/Restore: this process.  They will automatically
    Line 2964: Dec  2 05:00:01 Tower CA Backup/Restore: be restarted upon completion.
    Line 2965: Dec  2 05:00:01 Tower CA Backup/Restore: #######################################
    Line 2966: Dec  2 05:00:01 Tower CA Backup/Restore: Stopping binhex-nzbhydra2
    Line 2975: Dec  2 05:00:05 Tower CA Backup/Restore: docker stop -t 120 binhex-nzbhydra2
    Line 2976: Dec  2 05:00:05 Tower CA Backup/Restore: Stopping binhex-plexpass
    Line 2977: Dec  2 05:00:06 Tower CA Backup/Restore: docker stop -t 120 binhex-plexpass
    Line 2978: Dec  2 05:00:06 Tower CA Backup/Restore: Stopping binhex-radarr
    Line 2987: Dec  2 05:00:09 Tower CA Backup/Restore: docker stop -t 120 binhex-radarr
    Line 2988: Dec  2 05:00:09 Tower CA Backup/Restore: Stopping binhex-sabnzbd
    Line 2997: Dec  2 05:00:11 Tower CA Backup/Restore: docker stop -t 120 binhex-sabnzbd
    Line 2998: Dec  2 05:00:11 Tower CA Backup/Restore: Stopping binhex-sonarr
    Line 3007: Dec  2 05:00:14 Tower CA Backup/Restore: docker stop -t 120 binhex-sonarr
    Line 3008: Dec  2 05:00:14 Tower CA Backup/Restore: Stopping Netdata
    Line 3009: Dec  2 05:00:17 Tower CA Backup/Restore: docker stop -t 120 Netdata
    Line 3010: Dec  2 05:00:17 Tower CA Backup/Restore: Stopping ombi
    Line 3019: Dec  2 05:00:24 Tower CA Backup/Restore: docker stop -t 120 ombi
    Line 3020: Dec  2 05:00:24 Tower CA Backup/Restore: Stopping organizr
    Line 3029: Dec  2 05:00:31 Tower CA Backup/Restore: docker stop -t 120 organizr
    Line 3030: Dec  2 05:00:31 Tower CA Backup/Restore: Stopping tautulli
    Line 3039: Dec  2 05:00:38 Tower CA Backup/Restore: docker stop -t 120 tautulli
    Line 3040: Dec  2 05:00:38 Tower CA Backup/Restore: Backing Up appData from /mnt/user/appdata/ to /mnt/user/CommunityApplicationsAppdataBackup/[email protected]
    Line 3041: Dec  2 05:00:48 Tower CA Backup/Restore: Using command: cd '/mnt/user/appdata/' && /usr/bin/tar -cvaf '/mnt/user/CommunityApplicationsAppdataBackup/[email protected]/CA_backup.tar.gz' --exclude 'docker.img'  * >> /var/lib/docker/unraid/ca.backup2.datastore/appdata_backup.log 2>&1 & echo $! > /tmp/ca.backup2/tempFiles/backupInProgress
    Line 3142: Dec  2 05:51:35 Tower CA Backup/Restore: Backup Complete
    Line 3143: Dec  2 05:51:35 Tower CA Backup/Restore: Verifying backup
    Line 3144: Dec  2 05:51:35 Tower CA Backup/Restore: Using command: cd '/mnt/user/appdata/' && /usr/bin/tar --diff -C '/mnt/user/appdata/' -af '/mnt/user/CommunityApplicationsAppdataBackup/[email protected]/CA_backup.tar.gz' > /var/lib/docker/unraid/ca.backup2.datastore/appdata_backup.log & echo $! > /tmp/ca.backup2/tempFiles/verifyInProgress
    Line 3150: Dec  2 06:07:09 Tower CA Backup/Restore: #######################
    Line 3151: Dec  2 06:07:09 Tower CA Backup/Restore: appData Backup complete
    Line 3152: Dec  2 06:07:09 Tower CA Backup/Restore: #######################
    Line 3153: Dec  2 06:07:09 Tower CA Backup/Restore: Backup / Restore Completed
 

Can you post your settings? 

Link to comment
14 minutes ago, aragorn18 said:

Correct

Can you save the attached file onto your flash drive, then

cp /boot/backup.php /usr/local/emhttp/plugins/ca.backup2/scripts/backup.php
/usr/local/emhttp/plugins/ca.backup2/scripts/backup.php > /boot/backupdiag.log

After you get back a command prompt, post backupdiag.log on the flash drive here.

backup.php

Link to comment
2 hours ago, Squid said:

Can you save the attached file onto your flash drive, then


cp /boot/backup.php /usr/local/emhttp/plugins/ca.backup2/scripts/backup.php
/usr/local/emhttp/plugins/ca.backup2/scripts/backup.php > /boot/backupdiag.log

After you get back a command prompt, post backupdiag.log on the flash drive here.

backup.php

After 2 hours of running, the dockers came back up this time. So, I'm not sure if this is a relevant log file but I've attached it anyways.

 

I'll let it run tonight and see if it works better.

backupdiag.log

Link to comment
  • 4 weeks later...

I have CA Backup configured to backup to a UD mounted network volume (daily) and send notifications for errors only. The network volume was offline for the past 3 days so no backups were performed but also no notifications were sent. Shouldn't a failed backup generate an error notification?

 

I checked to be sure notifications are working after getting the network volume back online. Set notifications to "on completion" and ran a backup. Worked fine.

Link to comment

Hi @Squid,

 

Reconfigured my CA Backup/Restore from this mess

and the backup of appdata, libvirt, and flash (with compression and verify) took ~45 min for the 40Gb of data!

 

I simply wanted to post that this plugin is great and worked wonderfully!

 

Thank you again! 🍻

 

 

 

Now to figure out rsync and rclone...

 

Link to comment
3 minutes ago, fithwum said:

i would like to see a bi-weekly option added without having to do a custom job.

The default schedules are what unRaid's UI supports natively (and time is adjustable with the Schedules plugin)  anything else requires basically a cronjob UI which is just (to be honest) too much aggravation for me to do.

Link to comment
7 minutes ago, nuhll said:

never had problems for last 2-3 year

Thanks. The discussion was regarding dB corruption due stopping/starting docker, but surely this can’t be very common or it would be happening to a large number of users. I’ll probably just leave it at default for now and see what happens.

Link to comment
  • 3 weeks later...

This might be a dumb question but I couldn’t find out how to search for it correctly in this thread 😁

 

Is anyone using this plugin to backup random non-appdata folders on their cache? Seems like it could be as easy as changing the source to mnt/cache and then using the "Excluded Folders" to deselect those I don't want to backup? Basically trying to backup the appdata folder and a few others that are only on the cache.

 

Everywhere in the plugin it refers specifically to the appdata folder so I wanted to make sure there isn’t anything specific to just that use case before trying to set this up.

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