[Plugin] CA Appdata Backup / Restore v2


Squid

Recommended Posts

Hi,
I’ve got a few files saved at the root of my Appdata folder, with spaces and dashes in the filename (e.g. “frigate - config.yml”).
There seems to be a problem backing up these files, Tar returns an error as if it tries to backup “frigate”,”-“,”config.yml” as three different files…


Sent from my iPhone using Tapatalk

  • Thanks 1
Link to comment
2 hours ago, gaming09 said:

Would plex have to repull all the metadata of all your media ?

Yes, but on large libraries you're talking about hours every backup where dockers are off while millions of files are backed up (I estimate that due to backing up my entire Plex folder, my dockers are down for around 10 days every year).

Additionally, the amount of storage these files take to back up.

Touch wood, I've not had to restore Plex before, but I've refreshed all metadata before and it's not the end of the world.

Link to comment
4 hours ago, darkrom said:

Only question is how would you restore just one app?  Say I wanted to restore just Bitwarden, what would the process be?

 

I can help here.

 

582406867_2022-12-0612_57_48-.thumb.png.17c592e42e5b9956db22372d63f04bdd.png

  1. Open the unRAID terminal and go to your backup Destination Share:
    cd <Destination_Share>
  2. Find the backup you are looking for:
    ls
  3. Go into the directory of the backup you want to restore from:
    cd <backup_directory>
  4. Find the backup file you are looking for. In my example I am looking for <any>swag<any>:
    ls *swag*
  5. [Used only for demo purposes, don't do this.] I created a temp directory that I'll later delete:
    mkdir /mnt/cache/appdata/_testing_
  6. Extract the backup file from step 4 into your appdata directory [I used my temp directory.]:
    tar -zxvf <backup_filename> -C /mnt/cache/appdata/

 

  • Like 1
Link to comment
3 hours ago, gaming09 said:

Wouldnt you lose your watch history doing this if you were do set it back?
Would plex have to repull all the metadata of all your media ?

 

Watch state: I don't think it does. The watch state is stored in a SQLite database. You can read more about it here.

 

Repulling metadata: Correct, but that is simply a matter of time. Backing up Plex's entire directory takes me a little under an hour and eats many 10's of GB of disk space. That means all containers are down, there is extra wear/tear on my disks, and I am backing up data that is neither unique nor user-created. I can simply have Plex pull all that data down again should I need it.

 

3 hours ago, gaming09 said:

any idea of an easy way to copy the backups to a second location?

Manually or automatically? If manually:
cp <destination_directory_configured_in_plugin>\<name_of_backup_file> <location_to_keep_second_backup>

If automatically, create a script with all the cp commands you need and run it automatically using either cron on a script-running plugin.

 

Quote

@KluthR how do i buy ya a beer for all your hard work?

 

Hear, hear! I already offered, now I am offering again. PayPal? Venmo? Charitable donation to a cause you feel strongly about?

Edited by Hawkins
added quote about donating to KluthR
Link to comment
2 hours ago, wgstarks said:

Looks like the problem is that you’re backing up your logs and the log file changes during the backup so the check fails due to the mismatch. Try disabling the USB backup.

I just tried that and it did not work.  I've attached updated logs.  Ideally any solution would still include USB backups, since I do not like the cloud-based solution provided by Unraid post 6.9.

backup v2.log

  • Like 1
Link to comment
26 minutes ago, clowncracker said:

I just tried that and it did not work.  I've attached updated logs.  Ideally any solution would still include USB backups, since I do not like the cloud-based solution provided by Unraid post 6.9.

backup v2.log 1.24 kB · 5 downloads

This is the error-

[06.12.2022 20:04:45] Verifying Backup 
./syslog-192.168.1.15.log: Mod time differs
./syslog-192.168.1.15.log: Size differs
[06.12.2022 20:08:28] tar verify failed!

I had thought that file was on your flash but apparently it’s in appdata. You should be able to exclude it.

Link to comment
38 minutes ago, wgstarks said:

This is the error-

[06.12.2022 20:04:45] Verifying Backup 
./syslog-192.168.1.15.log: Mod time differs
./syslog-192.168.1.15.log: Size differs
[06.12.2022 20:08:28] tar verify failed!

I had thought that file was on your flash but apparently it’s in appdata. You should be able to exclude it.

That resolved the issue.  I find it weird that you cannot backup the systemlog, seems like a useful thing to keep backed up.  I'm more concerned about appdata, so at least backups are working again.

 

Thanks!

Link to comment
7 hours ago, clowncracker said:

That resolved the issue.  I find it weird that you cannot backup the systemlog, seems like a useful thing to keep backed up.  I'm more concerned about appdata, so at least backups are working again.

 

Thanks!

UnRAID has syslog server included. You can set that up to keep a permanent copy of the system log. It will store it to an array share.

  • Like 1
Link to comment

Hello, 

 

i've get an error since update AppData v2. 

 

For me meaningless error message:

[07.12.2022 07:32:05] A error occured somewhere. Not deleting old backup sets of appdata

 

Attached appdata_backup.log

 

But it's create the archive including appdata files, seems nothing is missing.

 

has anyone had this error before?

 

 

 

appdata_backup.log

Link to comment
14 minutes ago, unMaxe said:

Attached appdata_backup.log

Here’s the error-

/usr/bin/tar: ./JDownloader2/tmp: file changed as we read it
/usr/bin/tar: ./JDownloader2/jd: file changed as we read it
/usr/bin/tar: ./JDownloader2/libs/sevenzipjbindingLinux.jar: file changed as we read it
/usr/bin/tar: ./JDownloader2/libs: file changed as we read it
/usr/bin/tar: ./JDownloader2: file changed as we read it
/usr/bin/tar: ./plex/Library/Application Support/Plex Media Server/Cache: file changed as we read it
/usr/bin/tar: ./plex/Library/Application Support/Plex Media Server: file changed as we read it
/usr/bin/tar: ./plex/Library: file changed as we read it
/usr/bin/tar: ./plex: file changed as we read it
[07.12.2022 07:27:49] tar creation failed!

Looks like your Plex docker didn’t backup because it was running at the time the backup occurred and some of the data changed. You should set whatever dockers to stop before backup so this doesn’t happen.

Link to comment
22 minutes ago, wgstarks said:

Looks like your Plex docker didn’t backup because it was running at the time the backup occurred and some of the data changed. You should set whatever dockers to stop before backup so this doesn’t happen.

 

In Appdata Settings I only find under advanced options this field:

image.thumb.png.3f02efa960afdb65cb90a495c43e334a.png

 

Is there an other field to change docker stop options?

Link to comment
19 hours ago, unMaxe said:

 

In Appdata Settings I only find under advanced options this field:

image.thumb.png.3f02efa960afdb65cb90a495c43e334a.png

 

Is there an other field to change docker stop options?

I am having the same issue but its the docker.img that is changing as its being read. although looking at my logs there is no log for plex stopping. I have my plex appdata on its own ssd which I'm guessing is the issue here? As you would expect the plex app data doesnt appear as an option to exclude and also doesnt get backed up through the app (i have an rclone setting for that). I'm guessing this plugin doesnt stop the docker service and just stops each individual docker and because plex isnt in the normal appdata folder is doesnt stop it? Is there a way to set a schedule for plex to stop/start with this plugin when its on its own ssd?

Link to comment

Not sure where to post this but I have changed over to "Appdata Backup/Restore v2" and when I run the Update Assistance it returns the following:

 

Issue Found: ca.backup2.plg is not known to Community Applications. Compatibility for this plugin CANNOT be determined and it may cause you issues.

Link to comment
3 hours ago, tazire said:

I am having the same issue but its the docker.img that is changing as its being read.

The default location for the docker image would be /mnt/cache/docker.img but if you want it to be in appdata you can just exclude it from the backups. If you already have other exclusions set just enter it as ,/mnt/cache/appdata/docker.img (note the comma at the beginning).

  • Thanks 1
Link to comment
2 hours ago, ultimz said:

Issue Found: ca.backup2.plg is not known to Community Applications

Did you uninstalled the old version first?

 

2 hours ago, Revan335 said:

I have Issues to in the New Fork:

Please take a look inside the log file

 

5 hours ago, tazire said:

its the docker.img that is changing as its being read

You backup your docker.img? Why? Also, its being changed, because ca.backup2 writes the logfile into it, so it never worked before, but the error was being suppressed

 

On 12/7/2022 at 4:19 PM, unMaxe said:

i've get an error since update AppData v2.

ca.backup2 does not stop plex neither JD. Only two containers are being stopped:

[07.12.2022 07:20:01] Stopping pihole...  done! (took 4 seconds)
[07.12.2022 07:20:05] Stopping SyncoveryRS...  done! (took 7 seconds)

Dumb question but: Were the containers started? I think I will add some more (debug) info for the next release to track that down.

 

On 12/6/2022 at 9:33 PM, gshlomi said:

There seems to be a problem backing up these files, Tar returns an error as if it tries to backup “frigate”,”-“,”config.yml” as three different files…

The just released update should fix this - sorry!

Link to comment
9 hours ago, KluthR said:
12 hours ago, ultimz said:

Issue Found: ca.backup2.plg is not known to Community Applications

Did you uninstalled the old version first?

 

I did. I ticked the selection under Uninstall column and pressed the "Remove" button. Then installed the new plugin.

 

Is there something else I should do? Is anyone else getting the same alert from Update Assistant tool?

 

Link to comment
7 hours ago, Revan335 said:

Hmmm.... I'm waiting for the next run.

You could also try to manually start the backup - you should see some log output immediately.

 

1 hour ago, ultimz said:

Is there something else I should do?

No. Hmm. I dont know here. @Squid What would cause it to say those things in that case?

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