Synology_app_mover icon indicating copy to clipboard operation
Synology_app_mover copied to clipboard

v3.0 Beta test results - Backup/Restore All?

Open wallacebrf opened this issue 1 year ago • 20 comments
trafficstars

Synology_app_mover v3.0.15 DS920+ DSM 7.2.1-69057-4

when backing up a LOT of apps, it would be cool if there was an option to "backup all" and possibly to "restore all" where the script just automatically goes through every app.

wallacebrf avatar Feb 05 '24 22:02 wallacebrf

To avoid repeatedly stopping and starting the same apps if they are dependent on other apps I'd probably want to:

  1. Stop all the apps.
  2. Backup or restore all the apps.
  3. Start all the apps.

007revad avatar Feb 06 '24 07:02 007revad

i agree, with a large warning that the script is about to stop all packages and the NAS will basically loose all of its features for a while

wallacebrf avatar Feb 06 '24 13:02 wallacebrf

I've been working on a new version that has an option to backup or restore all packages. It should be ready in the next 24 hours.

007revad avatar Feb 09 '24 04:02 007revad

v3.0.24 https://github.com/007revad/Synology_app_mover/releases

If you select Backup or Restore the script now asks if you want to backup or restore all packages (that are installed on volumes).

007revad avatar Feb 10 '24 07:02 007revad

I'm thinking for backup and restore I should skip packages that are utilities with no Open option and no data.

Like the packages with startable="no" in their INFO file:

Node.js_v18
PHP7.3
PHP8.0
exFAT-Free 

and packages with ctl_stop="no" in their INFO file:

Python2
synocli-disk
synocli-misc

007revad avatar Feb 10 '24 21:02 007revad

Seems reasonable

wallacebrf avatar Feb 10 '24 21:02 wallacebrf

Done. https://github.com/007revad/Synology_app_mover/releases

If you have all packages, including syno community, installed it will reduce the number of packages to backup and restore by about 30.

007revad avatar Feb 10 '24 22:02 007revad

New version 3.0.26 with bug fix for Synology Drive, and now shows how long the script took.

https://github.com/007revad/Synology_app_mover/releases

007revad avatar Feb 11 '24 09:02 007revad

New version 3.0.27 https://github.com/007revad/Synology_app_mover/releases

  • Improved speed of getting list of packages to be 6 times faster.
    • Saves 1 second for every 20 packages installed.

007revad avatar Feb 11 '24 11:02 007revad

To avoid repeatedly stopping and starting the same apps if they are dependent on other apps I'd probably want to:

  1. Stop all the apps.
  2. Backup or restore all the apps.
  3. Start all the apps.

I wasn't happy with having all packages stopped until all packages have been backed up so I worked out a way to minimised the time each package is stopped during backup/restore while still only having each package stop and start once. https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.28

007revad avatar Feb 15 '24 21:02 007revad

performing a test of backup all. it was going through the apps and the time out to shut down "web station" was exceeded and it erred out and exited the script.

suggestions

1.) instead of exiting entire script can we just skip that particular app when the shutdown timer is exceeded so the script can keep going 2.) possibly make a date/time file version inside the backups. this is because now all of the apps that have already backed up need to backup again now that i manually stopped web station. if the time difference is less than a few hours, skip backing up apps again

wallacebrf avatar Feb 24 '24 21:02 wallacebrf

Good suggestions.

I've added skipping processing the app if the app fails to stop. It still starts the app just in case it stopped after the script timed out. https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.36

Give me a "minute" and I'll add a last backup date/time file.

007revad avatar Feb 24 '24 22:02 007revad

cool. it happened again for the "Archiware P5" app after already backing up like 40 some apps

wallacebrf avatar Feb 24 '24 22:02 wallacebrf

i will wait until you add the backup date/time. i just use the unix epoc time as it is in seconds and just do a direct math difference. i am thinking 360 minutes or less and it can just skip the backup

the Archiware P5 app has on multiple tries failed at stopping so i am not sure if it is an app issue or something else.

wallacebrf avatar Feb 24 '24 22:02 wallacebrf

i just use the unix epoc time as it is in seconds and just do a direct math difference. i am thinking 360 minutes or less and it can just skip the backup

That's exactly what I was thinking. I've just got to make sure that the backup was actually successful so I don't prevent backing it up again if it failed less then x minutes ago.

Do you think 360 minutes is better than 180 minutes?

007revad avatar Feb 24 '24 22:02 007revad

if you have 80 apps installed like i do on the test system and depending on the backup time (like docker or download station being huge) several hours could go by easily.

you could add it to the config file as a user adjustable variable

wallacebrf avatar Feb 24 '24 22:02 wallacebrf

I've added a skip_minutes setting in syno_app_mover.conf and the script now skips backing up apps that were backed up less than "skip_minutes" ago. https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.37

I still need to add a check that the app actually backed up okay.

007revad avatar Feb 24 '24 23:02 007revad

You can create the lastbackup file with:

echo -n "$(date +%s)" > "<path-to-folder>/lastbackup"

Then copy it into each app's folder in your /syno_app_mover folder (so you don't have to backup every package again just to create the lastbackup files).

007revad avatar Feb 24 '24 23:02 007revad

Perfect I will continue testing

wallacebrf avatar Feb 25 '24 00:02 wallacebrf

confirmed the skip backup works perfect. continuing testing with v3.0.38

wallacebrf avatar Feb 25 '24 18:02 wallacebrf