Backup emblems

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
yosemitedyess
Level 1
Level 1
Posts: 2
Joined: Sun Oct 22, 2017 4:12 pm

Backup emblems

Post by yosemitedyess » Sat Nov 17, 2018 12:49 am

I need to backup the emblems that are attached to my files!. I have tried backing up my Home folder but no luck and so I believe that it must be in the root side. I use these emblems to identify files that I have previously watched to listened to and when there are a lot of files if I loose the emblems that I have appended will be a dread and a lot of work will be lost.Thanks!!

User avatar
smurphos
Level 8
Level 8
Posts: 2246
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Backup emblems

Post by smurphos » Sat Nov 17, 2018 1:23 am

Which version of Mint?

If Mint 19 you can get the emblem metadata for any particular folder using this command. I'm pretty sure (but not certain) this is desktop / file manager agnostic. It works on Cinnamon.

gio info /path/to/folder | grep emblems

The equivalent in 18.x is

gvfs-info /path/to/folder | grep emblems

You can set an emblem programmatically using gio set or gvfs-set-attribute

So it should be possible to write a script to backup a list of folder names and/or paths and their emblems and another script ot restore them.

How are you backing up your home folder? I've just done a check with rsync and that doesn't appear to include metadata (not with the arguments I normally use anyway). Neither does cp even with a --preserve=all or -a argument. Copy and paste in Nemo does though.

User avatar
smurphos
Level 8
Level 8
Posts: 2246
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Backup emblems

Post by smurphos » Sun Nov 18, 2018 1:49 am

Just an addition - I think all modifications including emblems are stored in ~/.local/share/gvfs-metadata so including that folder in your backup and restore process might be enough to maintain your modifications. Do test first though I've not tried this.

Post Reply

Return to “Newbie Questions”