Synology_app_mover
Synology_app_mover copied to clipboard
cannot backup Synology Photos‘ album and face data ...
hello, i test this script,and try to backup Synology Photos,and then i delete one album on the web of this package,and then use script to restore. but i discover the number of album does not restore,why?
these doesnot backup
The script only backs up the packages and their settings and database. It does not backup any shared folders.
For a full backup, that you can later restore, you'd also need to backup:
- The Photos folder in each user's home folder.
- The photo shared folders if Shared Space is enabled.
The script only backs up the packages and their settings and database. It does not backup any shared folders.
For a full backup, that you can later restore, you'd also need to backup:
- The Photos folder in each user's home folder.
- The photo shared folders if Shared Space is enabled.
these data cannot be found in the home folder,such as face discover data , tag...
This will do the job : https://github.com/007revad/Synology_app_mover/issues/114#issuecomment-2375487880
It did for me.
@OrpheeGT just reminded me of something.
@PrestarLin Try this:
- Go to Synology Photos > Settings > Shared Space.
- Disable the Shared Space.
- Then go back in and Enable Shared Space.
@OrpheeGT just reminded me of something.只是让我想起了一件事。
@PrestarLin Try this: 试试这个:
- Go to Synology Photos > Settings > Shared Space.进入 Synology Photos > 设置 > 共享空间。
- Disable the Shared Space.禁用共享空间。
- Then go back in and Enable Shared Space.然后返回并启用共享空间。
i have not Enable Shared Space. maybe the script should also backup database? or not just package file.
Backing up, and restoring, the pgsql database is not possible because there are 7 or more Synology packages that use the same database. Restoring a backup of the database would also restore old data for the other 6 packages.
These are the ones I know of:
Audio Station
Calendar
Contacts
Download Station
Media Server
Synology Application Service
Synology Photos
Video Station
So it makes sense only when source volume is meant to be deleted (like mine did when FS crashed)
You can add Surveillance Station to the list. Maybe Synology Drive too.
So it makes sense only when source volume is meant to be deleted (like mine did when FS crashed)因此,只有当源卷要被删除时才有意义(就像我在 FS 崩溃时所做的那样)
You can add Surveillance Station to the list. Maybe Synology Drive too.您可以将 Surveillance Station 添加到列表中。也许 Synology Drive 也是如此。
how to backup it?
pg_dump and pg_restore with postgres user would probably be an option to backup only some databases from whole DBs
pg_dump dbname > backup.sql
pg_restore backup.sql
But it probably does not handle user backup/rights...
The best way would be to install the app, it will create users/and db structure in @database.. Then truncate (delete ?) app DB with psql, and reimport it with pg_restore... ?
Maybe this could be tried at import step to prune empty/dummy db from fresh app install before it import real datas...
https://stackoverflow.com/questions/2056876/postgres-clear-entire-database-before-re-creating-re-populating-from-bash-scr
To be tested on dev env... I'm not a DB expert.
Maybe something like
as root (sudo su -) :
# create temp backup folder on new volume
mkdir /volumeX/pg_dump
# Give owner rights to postgres
chown postgres: /volumeX/pg_dump
# switch to postgres user
su - postgres
# change folder
cd /volumeX/pg_dump
# backup desired DB from current DB before move. (here synofoto)
pg_dump synofoto > synofoto.sql
Now DB is backuped, when you want to restore it :
# Install app from Store (like Synology photo).
# It will create DB structure.
# Then stop newly installed app.
# Copy/restore all photos shared folder
# from root login as postgres user
su - postgres
# change to backuped folder DB
cd /volumeX/pg_dump
# Import backup
pg_restore --clean -d synofoto synofoto.sql
# Start the app and pray
Start the app and pray
I like your optimism
