[Plugin] CA Appdata Backup / Restore v2.5


KluthR

Recommended Posts

1 hour ago, calvados said:

This had no impact on the V2 version of the plugin

Somehow I doubt that. Because that portion at the backup script was never touched by me. The check was always on the same position. No chance, that V2 worked that way.

 

V2 before I changed anything: https://github.com/Squidly271/ca.backup2/blob/master/source/ca.backup2/usr/local/emhttp/plugins/ca.backup2/scripts/backup.php#L31

Link to comment
1 hour ago, KluthR said:

Somehow I doubt that. Because that portion at the backup script was never touched by me. The check was always on the same position. No chance, that V2 worked that way.

 

V2 before I changed anything: https://github.com/Squidly271/ca.backup2/blob/master/source/ca.backup2/usr/local/emhttp/plugins/ca.backup2/scripts/backup.php#L31

 

I need to eat a bit of crow here.  I just checked the timestamps on my backups, and you are correct that it stopped working once I turned off users shares.  I didn't realize that backups weren't running!

 

Is a fix possible, or do I need to turn users shares back on?  Asides from running these backups I have no other use for user shares.

 

Thanks again @KluthR  :)

Link to comment

I was running into the common backup error related to dockers. Came to this thread for some research. Found a lot of people that weren't stopping all dockers - that's not my case as I am in fact stopping all dockers... So I was poking around a bit more and testing...

 

For the record here are the errors that I ran into:
 

[27.01.2023 05:04:31] Verifying Backup

./binhex-qbittorrentvpn/qBittorrent/config/qBittorrent.conf: Mod time differs

./binhex-qbittorrentvpn/qBittorrent/data/logs/qbittorrent.log: Mod time differs

./binhex-qbittorrentvpn/qBittorrent/data/logs/qbittorrent.log: Size differs

[27.01.2023 05:06:36] tar verify failed!

 

Last successful backup (scheduled weekly, Friday's, 5AM) was Dec 9th.

 

While manually running a backup, confirming that all dockers remained down via the web UI (they did) - it still failed. So I did it again and ran

ps -ef | grep -i qb

while the back up was running... Found this guy:

root     19499     1  0  2022 ?        00:00:02 /usr/bin/ttyd -d0 -t disableLeaveAlert true -t theme {'background':'black'} -t fontSize 15 -t fontFamily monospace -i /var/tmp/binhex-qbittorrentvpn.sock docker exec -it binhex-qbittorrentvpn bash

 

bingpot!

 

Killed that process, re-ran and I've got successful backups again.

 

Looks like this process is from opening the console to that docker from the UI. I'm able to reproduce this hanging process - typing "exit" in the console windows just re-opens a new shell. Closing the browser window seems to be the only way to "close" it - but the process remains.

 

The following command will kill all running docker exec commands - but may potentially be too greedy depends on your specific needs - good enough for what I do though:

ps -ef | grep -i "docker exec -it" | grep -v grep | awk '{print $2}' | xargs kill

 

I will likely be putting this command in a pre-start script.

 

Thought I post here in case anyone is having similar problems.

  • Thanks 2
Link to comment

@KluthR,  It worked without issue.  Thank you again so much for such a quick fix.  :)

 

If I may, I'd like to make two suggestions:

- For the USB backup, could it be backed up into a timestamped folder in the same way that the appdata folder is?

- Could there be an option for the USB backup that defines its own backup schedule and its own 'number of backups to keep'?

 

Thanks again @KluthR

Link to comment
5 hours ago, calvados said:

For the USB backup

Yes, this rsync thing will replaced. As you already read, Iam working on a rewrite. This is then Unraid 6.12+ compatible and serves more functionality.

 

5 hours ago, calvados said:

Could there be an option for the USB backup that defines its own backup schedule

Hmm. It could. I think about it :)

  • Like 2
Link to comment

Thank you for the work on this plugin - much appreciated!

I seem to recall a setting to tell the plugin how many backups to keep? I can not find this after searching and googling.

I do appdata backups every two weeks and want to keep the last three.

I am sure this is obvious and am sorry I cannot find it. Thanks!

Link to comment
4 minutes ago, TexasDave said:

Thank you for the work on this plugin - much appreciated!

I seem to recall a setting to tell the plugin how many backups to keep? I can not find this after searching and googling.

I do appdata backups every two weeks and want to keep the last three.

I am sure this is obvious and am sorry I cannot find it. Thanks!


0248FE56-545E-41B9-A999-1251C94D253C.thumb.jpeg.6790f25c42da1db6f269f24bb2896277.jpeg

 

This is the closest setting.

  • Like 1
Link to comment

@wgstarks - thank you for that! I cannot believe I missed it...

Just started seeing this in my logs. Anything to be concerned about?

Thanks!
 

Jan 30 15:56:47 Zack-unRAID root: error: /plugins/ca.backup2/include/backupExec.php: wrong csrf_token
Jan 30 15:56:48 Zack-unRAID root: error: /plugins/ca.backup2/include/backupExec.php: wrong csrf_token
Jan 30 15:56:50 Zack-unRAID root: error: /plugins/ca.backup2/include/backupExec.php: wrong csrf_token
Jan 30 15:56:52 Zack-unRAID root: error: /plugins/ca.backup2/include/backupExec.php: wrong csrf_token

 

Link to comment

Would there be any issues making the appdata backup share Cache setting to YES?  My thought is that my Plex docker is over 300GB so when it starts running at 1am there is no way for it to complete by the next day when I need my other dockers up and running.  If it was storing to the same cache disk it would take a bunch of space but then mover would take care of the transfer once the dockers have been started back up again so speed wouldn't be a concern. 

Link to comment

Double Notifications

 

I can't say how long this has been going on for as I just noticed it. I'm seeing double notifications of appdata backup, and, from different 'senders'.

 

It always starts with "Community Applications" but shows finished from "CA Backup".

 

Same start and end times.

 

Nothing showing wrong in the log at all.

 

image.png.50124ef16f3d8a91866bc17ccc013be1.png

Link to comment
1 hour ago, KluthR said:

Maybe some differences in the code. Something I fix later.

 

you could notifs at errors only, if you wish.

I put it to notify just to make sure that it was actually running. I'll be changing it back to errors only now.

 

Just thought I would mention what I saw happening.

Edited by aglyons
Link to comment
13 hours ago, KluthR said:

I dont understand what you want to ask @darthjonathan12, sorry :(

 

The plugin does not touch any share settings. And you decide where it copies data from and to.

Sorry, 

 

Following the SpaceInvader setup of the original AppData Backup he recommended creating a share called "AppData Backup" and set the Cache setting of that share to No.  But I think you answered my question since it doesn't matter where it goes as long as you can access it for restoring. 

 

Edited by darthjonathan12
Link to comment
On 12/23/2022 at 8:48 PM, KluthR said:

 

Planned features

  • Multicore backup

Is that gonna include using something like pigz for multicore compression of backups? Would love to see that! In the meantime, is there any way to make the plugin use pigz instead of gzip for compression of files?

Link to comment
3 hours ago, drdebian said:

Is that gonna include using something like pigz for multicore compression of backups?

Exactly!

 

3 hours ago, drdebian said:

In the meantime, is there any way to make the plugin use pigz instead of gzip for compression of files?

No

  • Like 1
Link to comment
  • KluthR changed the title to [Plugin] CA Appdata Backup / Restore v2.5

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.