← Back to list

The tips that I collected on backup files

There are too many files on my machine, and I want to backup them to the cloud, and I also don’t just backup the plain files, so I want to…

Stephen Lee · 2022-12-07 08:44 · 0 claps · 1.1 min read
#backup #encryption #7z #mac
Open on Medium ↗
Wiki topics: 🔒 · Cybersecurity

The tips that I collected on backup files

There are too many files on my machine, and I want to backup them to the cloud, and I also don’t just backup the plain files, so I want to compress the files and encrypt them, these are the tips that I get when I try to do the job. The first tip I get when I try to back the file names, the second tip is to encrypt the file name together with the file content.

Show Unicode for tree command

Today, I find that when I use the tree command to list files in a directory, the filename with Unicode didn’t show correctly, for the filename has some Chinese characters, we can use the -N option to show the characters correctly, the command is like below:

$ tree -N ~/Downloads > Downloads_221205.txt

I got help from tree command shown Chinese character as unicode

Encrypt file content together with file names with 7z

I want to backup my files on cloud driver, but I don’t want my files to be scanned, so I want to encrypt the file content and also the file names in the zip file. I find in the internet that we can use 7z to implements this, the command is like below:

$ 7zz a -p -mhe=on Downloads_221205.7z Downloads/

To list the content of the files we can use the following commands:

$ 7zz l Downloads_221205.7z 

메타데이터
post_id
8d547f5b1eb8
slug
the-tips-that-i-collected-on-backup-files-8d547f5b1eb8
url
https://medium.com/@liwp.stephen/the-tips-that-i-collected-on-backup-files-8d547f5b1eb8
canonical_url
https://medium.com/@liwp.stephen/the-tips-that-i-collected-on-backup-files-8d547f5b1eb8
author_url
https://medium.com/@liwp.stephen
status
ok
fetched_at
2026-06-20 20:29:01