How to backup the Secure Folder on your Samsung Galaxy phone/tablet… when you’re a techie

Whoever has sensitive data on their Samsung Galaxy phone or tablet may be a happy user of the Samung Secure Folder app, or "Veilige Map" as we call it in Dutch. It's a great way to keep your family out of your financial files or even your girl's nudies :-)

One thing is lacking though: A good backup procedure. Or as Samsung states on their website:

Although backing up your data is no longer supported in Secure Folder, you can restore data from previous backups and transfer your Secure Folder to a new device using Smart Switch. -- https://www.samsung.com/us/support/answer/ANS10001401/

Great! But I need to have backups in the future, not in the past. Luckily I found a great way to backup my data!

The Secure Folder seems to be a stripped down user that runs in parallel on the same device. Android supports multiple users by default, but not all devices show that option. Galaxy Tablets usually do, Galaxy Phones don't. But in this case, you don't want to switch users, it's more like Windows' "run as..." option that you want to use: to run an application as a different user, with that users permissions and resources.

That Secure Folder user does not allow much access. For example, the My Files app does not have SMB (Samba) access, while the My Files app of the main user does have that option. But trying to get that to work gave me some ideas.

You can easily install all sorts of apps in the Secure Folder container. Using the plus sign at the top of the Secure Folder app, you can install apps from the main user in the Secure Folder. Also, Google Play and Galaxy Store are available via this route. You can install dozens of SSH Server, SMB Server and other apps that make your Secure Folder data accessible from your computer. (Just remember to close the connection then the backup is done.)

Downside to this approach is that both Google Play and Galaxy Store require you to log in, and I have no idea what happens then. Will they see it as a new user? Mess up my settings? Personally, I downloaded F-Droid from the main user, then moved the APK into the Secure Folder. There I installed it, after which I had access to multiple Server apps. I chose SshDaemon.

After configuring SshDaemon, you can easily log in to the phone via sshfs (on Linux) or a random scp client such as FileZilla. For sshfs, this link could be handy.

I might explore FolderSync Pro at some point. I'm already using this app for the main user, it was well worth the €7. (There's a ad-supported version available as well.)

So, while Samsung does not support backupping your Secure Folder, I believe there are plenty of options available to the the more technical user.

© GeekLabInfo How to backup the Secure Folder on your Samsung Galaxy phone/tablet... when you're a techie is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to https://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Backup your website over FTP

One of my customers is being hosted at a crappy hosting provider, which I do not trust at all. In fact, I have actually seen that I made changes to the website, which were reverted a couple of days later.

To never lose any data on the FTP, I wrote a script to make backups of the FTP, while not wasting too much bandwidth or disk space. I based this script on the principle that rsnapshot uses: hardlinks and rotation.

#!/bin/bash    
 
for i in `seq 100 -1 2`; do
        if [ -d $i ]; then
                echo mv $i $((i+1))                                                                 
                mv $i $((i+1))
        fi
done
echo cp -al 1 2
cp -al 1 2
 
HOST="type-hostname-here.com"
USER="type-username-here"
PASS="type-password-here"
LCD="/backups/1"
RCD="/remote/path/httpdocs"
 
mkdir -p $LCD            
lftp -c "set ftp:list-options -a;
set ftp:ssl-force;
open ftp://$USER:$PASS@$HOST;
lcd $LCD;
cd $RCD;
mirror --verbose \
       --delete \
       --exclude-glob __old \
       --exclude-glob phpmyadmin

In this example the directory __old is not copied, nor is phpmyadmin. What is does, is move the directory 99 to 100, then it moves 98 to 99, 97 to 98 etc until 2 is moved to 3. It then hardlinks the directory 1 to 2. This way, a 100Mb file that is not modified can exist in all 100 directories while only using one single block of 100Mb of disk space.

Finally, the script uses lftp to download all modified files from the remote ftp server. Luckily, lftp doesn't just open a local file to modify its contents: instead remotely modified files are first unlinked locally, then re-downloaded. This way, lftp does not interfere with the hardlink system.

Database backup

This method does NOT backup your database. Don't forget to backup your database!© GeekLabInfo
Backup your website over FTP is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to https://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...