Which dotfiles are worth saving?

In getting ready to try the latest "full-upgrade" for RaspiOS I decided to save a copy of my home directory on another machine, just in case the upgrade goes wrong.

It turns out to be a fairly big job, mostly because of dotfiles.

Is there any simple rule of thumb for cleaning up before backing up? I'd like to avoid destroying useful things (saved login credentials) that notes and memory might not record accurately. The rest can go.

Thanks for reading,

bob prohaska

Reply to
bob prohaska
Loading thread data ...

Well, in genral, anything in ~/.config and/or files that have a .conf or .cfg suffix are configuration files for programs you have installed so are worth keeping if you want to keep your configurations.

Files in .cache directories or with similar suffix are cache files and just preserve state to speed things up a little so can usually be discarded.

Then there are .login, .profile, .bashrc, .bash which are your login and shell environment and configuration. If you have changed them you probably want to preserve them.

However, having said all that, I'd recommened copying the whole of /home out to a backup and then copying it back in after the upgrade. Restoring cache files won't do any harm.

--
Chris Green
Reply to
Chris Green

I never clean out .dotfiles. As others have said most of them are parameter sets and/or data stores for the more complex applications you use, such as news readers, mail readers and LibreOffice - you really, really want to keep these dotfiles!

That said, I don't bother backing up the caches some programs create: long ago I configured my web browsers (Firefox and Brave) to empty their caches when they're closed. Another candidate for this treatment is Google Earth, though you have to remember to empty its cache manually (go to Tools:Options:Cache to do that)because automatically emptying its cache in exit isn't a configurable option, and I exclude stuff like the .tracker cache and similar from all backups, which I do with rsync. Rsync is recommended because its hugely faster than making tar, gzipped tar or zip backups. Avoid the latter because zip doesn't fully understand Linux file permissions and ownership, unlike tar, which does.

If you're planning to do a full upgrade on the same SD card, either use rsync to make a logical backup or use Clonezilla

formatting link

to duplicate the SD card. If you use Clonezilla, mount the EXT partition on the newly copied SD card and empty the /boot directory in it - this should be empty since its only use on an RPi is as a mountpoint for the FAT32 boot partition.

To get clonezilla, download an iso image from their website and burn it to a CD, which makes the CD into a bootable Debian system. Booting that and using it to copy both partitions to a new SD card (expanding them as needed) should leave yo with a new, bootable SD card ready for doing in in-situ Raspi upgrade.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

In the end, that is what I did. As it happened, the upgrade went without a hitch (so far!) and I haven't needed to restore anything at all.

I was somewhat stunned at the number and volume of files transferred,

2.8 GB, 2.0 of them .cache files.

Where does the chromium browser store login credentials? A Web search didn't turn up any ready answers for the case of the Pi. It appears that Mac and Windows put them in system directories.

Thanks for reading!

bob prohaska

Reply to
bob prohaska

Yep, they are bulky, and not worth backing up since in general they're temporary files and contain nothing that doesn't already exist elsewhere.

BTW, speaking of backups: my house server gets automatically backed up by a cron job that runs at 03:00 every dat. Originally this made a compressed .tgz (gzipped tar archive) file each day. About 3-4 years back this was taking 3.5 hours to run each night: not a problem since the system was never doing anything else at the time, but I was already planning to scan in my CD collection, which ended up at 145GB, so I switched over to using rsnapshot to make the same backup: this now takes

9 minutes plus a weekly run of about 10 minutes.

For those who don't know, rsnapshot is a backup subsystem that manages the number of daily and weekly backups that are kept. The daily run backs up changes made during the previous 24 hours, while the weekly run concatenates the last week's daily backups into a single weekly backup.

Pass - I don't and won't use the Chromium Browser or the Google Search engine for that matter, because I want to minimise the amount of my data that is stolen and monetised by Google as possible. AFAICT the *only* Google code I use is Google Pro, and thats only because there is not non- Google equivalent available - and don't forget that it was NOT developed by them - they bought it in during the first Internet boom.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

On Sun, 6 Dec 2020 17:35:23 -0000 (UTC), bob prohaska declaimed the following:

Well, a quick scan of

ls -Ral .config/chromium

shows a likely candidate in

.config/chromium/Default: total 736 drwxr-xr-x 25 pi pi 4096 Dec 1 13:12 . drwxr-xr-x 17 pi pi 4096 Aug 22 15:06 ..

-rw------- 1 pi pi 0 Dec 19 2019 000003.log drwx------ 2 pi pi 4096 Aug 22 15:04 AutofillStrikeDatabase drwxr-xr-x 3 pi pi 4096 Aug 22 15:04 blob_storage drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 BudgetDatabase

-rw-r--r-- 1 pi pi 28672 Aug 22 15:04 Cookies

-rw-r--r-- 1 pi pi 0 Aug 22 15:04 Cookies-journal

-rw------- 1 pi pi 16 Dec 19 2019 CURRENT

-rw------- 1 pi pi 1315 Aug 22 15:05 'Current Session'

-rw------- 1 pi pi 1094 Aug 22 15:06 'Current Tabs' drwx------ 2 pi pi 4096 Dec 19 2019 databases drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 data_reduction_proxy_leveldb drwxr-xr-x 2 pi pi 4096 Jul 1 13:21 'Extension Rules' drwxr-xr-x 5 pi pi 4096 Aug 22 15:03 Extensions drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 'Extension State'

-rw-r--r-- 1 pi pi 24576 Jul 1 13:29 Favicons

-rw-r--r-- 1 pi pi 0 Jul 1 13:29 Favicons-journal drwxr-xr-x 4 pi pi 4096 Nov 18 2019 'Feature Engagement Tracker' drwx------ 3 pi pi 4096 Apr 27 2020 'GCM Store' drwxr-xr-x 2 pi pi 4096 Nov 18 2019 GPUCache

-rw------- 1 pi pi 16384 Apr 27 2020 heavy_ad_intervention_opt_out.db

-rw------- 1 pi pi 0 Apr 27 2020 heavy_ad_intervention_opt_out.db-journal

-rw-r--r-- 1 pi pi 118784 Aug 22 15:06 History

-rw-r--r-- 1 pi pi 0 Aug 22 15:06 History-journal

-rw-r--r-- 1 pi pi 466 Aug 22 15:05 'History Provider Cache' drwx------ 5 pi pi 4096 Dec 19 2019 IndexedDB

-rw------- 1 pi pi 1267 Aug 22 15:03 'Last Session'

-rw------- 1 pi pi 1022 Aug 22 15:03 'Last Tabs' drwx------ 4 pi pi 4096 Dec 19 2019 'Local Extension Settings' drwx------ 3 pi pi 4096 Dec 19 2019 'Local Storage'

-rw------- 1 pi pi 0 Dec 19 2019 LOCK

-rw------- 1 pi pi 46 Dec 19 2019 LOG

-rw-r--r-- 1 pi pi 22528 Apr 27 2020 'Login Data'

-rw-r--r-- 1 pi pi 0 Apr 27 2020 'Login Data-journal' drwx------ 3 pi pi 4096 Dec 19 2019 'Managed Extension Settings'

-rw------- 1 pi pi 50 Dec 19 2019 MANIFEST-000002

-rw-r--r-- 1 pi pi 45056 Aug 22 15:02 'Network Action Predictor'

-rw-r--r-- 1 pi pi 0 Aug 22 15:02 'Network Action Predictor-journal'

-rw------- 1 pi pi 1633 Aug 22 15:06 'Network Persistent State'

-rw------- 1 pi pi 0 Jul 1 13:29 .org.chromium.Chromium.OAMYZt

-rw-r--r-- 1 pi pi 0 Nov 6 2019 page_load_capping_opt_out.db-journal drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 'Platform Notifications'

-rw------- 1 pi pi 30119 Dec 1 13:12 Preferences

-rw-r--r-- 1 pi pi 16384 Nov 6 2019 previews_opt_out.db

-rw-r--r-- 1 pi pi 0 Nov 6 2019 previews_opt_out.db-journal

-rw------- 1 pi pi 53248 Apr 27 2020 QuotaManager

-rw------- 1 pi pi 0 Apr 27 2020 QuotaManager-journal

-rw-r--r-- 1 pi pi 95 Nov 6 2019 'Secure Preferences' drwx------ 5 pi pi 4096 Dec 19 2019 'Service Worker' drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 'Session Storage' drwxr-xr-x 3 pi pi 4096 Aug 22 15:04 shared_proto_db

-rw-r--r-- 1 pi pi 20480 Apr 27 2020 Shortcuts

-rw-r--r-- 1 pi pi 0 Apr 27 2020 Shortcuts-journal drwxr-xr-x 2 pi pi 4096 Aug 22 15:04 'Site Characteristics Database' drwxr-xr-x 3 pi pi 4096 Nov 18 2019 'Sync Data' drwx------ 3 pi pi 4096 Dec 19 2019 'Sync Extension Settings'

-rw-r--r-- 1 pi pi 20480 Apr 27 2020 'Top Sites'

-rw-r--r-- 1 pi pi 0 Apr 27 2020 'Top Sites-journal'

-rw-r--r-- 1 pi pi 2537 Nov 6 2019 'Translate Ranker Model'

-rw------- 1 pi pi 2019 Aug 22 15:04 TransportSecurity drwx------ 2 pi pi 4096 Dec 19 2019 VideoDecodeStats

-rw-r--r-- 1 pi pi 131072 Aug 22 15:04 'Visited Links'

-rw-r--r-- 1 pi pi 69632 Apr 27 2020 'Web Data'

-rw-r--r-- 1 pi pi 0 Apr 27 2020 'Web Data-journal'

"Login Data" appears to be an SQLite3 database. (Having sftp to my Windows machine and opening it in both SQLiteStudio and "DB Browser for SQLite" reveals I have no saved login data, so the hexdump below is safe to include).

pi@rpi3bplus-1:~$ hexdump -C .config/chromium/Default/Login\ Data

00000000 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 |SQLite format 3.| 00000010 08 00 01 01 00 40 20 20 00 00 00 06 00 00 00 0b |.....@ ........| 00000020 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 04 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 |................| 00000060 00 2e 38 08 0d 00 00 00 0a 01 73 00 07 6f 07 d7 |..8.......s..o..| 00000070 01 73 07 42 06 ee 06 43 05 ad 04 bf 05 82 04 6f |.s.B...C.......o| 00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000170 00 00 00 85 79 03 07 17 19 19 01 8b 4d 74 61 62 |....y.......Mtab| 00000180 6c 65 6c 6f 67 69 6e 73 6c 6f 67 69 6e 73 04 43 |leloginslogins.C| 00000190 52 45 41 54 45 20 54 41 42 4c 45 20 6c 6f 67 69 |REATE TABLE logi| 000001a0 6e 73 20 28 6f 72 69 67 69 6e 5f 75 72 6c 20 56 |ns (origin_url V| 000001b0 41 52 43 48 41 52 20 4e 4f 54 20 4e 55 4c 4c 2c |ARCHAR NOT NULL,| 000001c0 20 61 63 74 69 6f 6e 5f 75 72 6c 20 56 41 52 43 | action_url VARC| 000001d0 48 41 52 2c 20 75 73 65 72 6e 61 6d 65 5f 65 6c |HAR, username_el| 000001e0 65 6d 65 6e 74 20 56 41 52 43 48 41 52 2c 20 75 |ement VARCHAR, u| 000001f0 73 65 72 6e 61 6d 65 5f 76 61 6c 75 65 20 56 41 |sername_value VA| 00000200 52 43 48 41 52 2c 20 70 61 73 73 77 6f 72 64 5f |RCHAR, password_| 00000210 65 6c 65 6d 65 6e 74 20 56 41 52 43 48 41 52 2c |element VARCHAR,| 00000220 20 70 61 73 73 77 6f 72 64 5f 76 61 6c 75 65 20 | password_value | 00000230 42 4c 4f 42 2c 20 73 75 62 6d 69 74 5f 65 6c 65 |BLOB, submit_ele| 00000240 6d 65 6e 74 20 56 41 52 43 48 41 52 2c 20 73 69 |ment VARCHAR, si| 00000250 67 6e 6f 6e 5f 72 65 61 6c 6d 20 56 41 52 43 48 |gnon_realm VARCH| 00000260 41 52 20 4e 4f 54 20 4e 55 4c 4c 2c 20 70 72 65 |AR NOT NULL, pre| 00000270 66 65 72 72 65 64 20 49 4e 54 45 47 45 52 20 4e |ferred INTEGER N| 00000280 4f 54 20 4e 55 4c 4c 2c 20 64 61 74 65 5f 63 72 |OT NULL, date_cr| 00000290 65 61 74 65 64 20 49 4e 54 45 47 45 52 20 4e 4f |eated INTEGER NO| 000002a0 54 20 4e 55 4c 4c 2c 20 62 6c 61 63 6b 6c 69 73 |T NULL, blacklis| 000002b0 74 65 64 5f 62 79 5f 75 73 65 72 20 49 4e 54 45 |ted_by_user INTE| 000002c0 47 45 52 20 4e 4f 54 20 4e 55 4c 4c 2c 20 73 63 |GER NOT NULL, sc| 000002d0 68 65 6d 65 20 49 4e 54 45 47 45 52 20 4e 4f 54 |heme INTEGER NOT| 000002e0 20 4e 55 4c 4c 2c 20 70 61 73 73 77 6f 72 64 5f | NULL, password_| 000002f0 74 79 70 65 20 49 4e 54 45 47 45 52 2c 20 74 69 |type INTEGER, ti| 00000300 6d 65 73 5f 75 73 65 64 20 49 4e 54 45 47 45 52 |mes_used INTEGER| 00000310 2c 20 66 6f 72 6d 5f 64 61 74 61 20 42 4c 4f 42 |, form_data BLOB| 00000320 2c 20 64 61 74 65 5f 73 79 6e 63 65 64 20 49 4e |, date_synced IN| 00000330 54 45 47 45 52 2c 20 64 69 73 70 6c 61 79 5f 6e |TEGER, display_n| 00000340 61 6d 65 20 56 41 52 43 48 41 52 2c 20 69 63 6f |ame VARCHAR, ico| 00000350 6e 5f 75 72 6c 20 56 41 52 43 48 41 52 2c 20 66 |n_url VARCHAR, f| 00000360 65 64 65 72 61 74 69 6f 6e 5f 75 72 6c 20 56 41 |ederation_url VA| 00000370 52 43 48 41 52 2c 20 73 6b 69 70 5f 7a 65 72 6f |RCHAR, skip_zero| 00000380 5f 63 6c 69 63 6b 20 49 4e 54 45 47 45 52 2c 20 |_click INTEGER, | 00000390 67 65 6e 65 72 61 74 69 6f 6e 5f 75 70 6c 6f 61 |generation_uploa| 000003a0 64 5f 73 74 61 74 75 73 20 49 4e 54 45 47 45 52 |d_status INTEGER| 000003b0 2c 20 70 6f 73 73 69 62 6c 65 5f 75 73 65 72 6e |, possible_usern| 000003c0 61 6d 65 5f 70 61 69 72 73 20 42 4c 4f 42 2c 20 |ame_pairs BLOB, | 000003d0 69 64 20 49 4e 54 45 47 45 52 2c 20 64 61 74 65 |id INTEGER, date| 000003e0 5f 6c 61 73 74 5f 75 73 65 64 20 49 4e 54 45 47 |_last_used INTEG| 000003f0 45 52 20 4e 4f 54 20 4e 55 4c 4c 20 44 45 46 41 |ER NOT NULL DEFA| 00000400 55 4c 54 20 30 2c 20 50 52 49 4d 41 52 59 20 4b |ULT 0, PRIMARY K| 00000410 45 59 20 28 69 64 29 2c 20 55 4e 49 51 55 45 20 |EY (id), UNIQUE | 00000420 28 6f 72 69 67 69 6e 5f 75 72 6c 2c 20 75 73 65 |(origin_url, use| 00000430 72 6e 61 6d 65 5f 65 6c 65 6d 65 6e 74 2c 20 75 |rname_element, u| 00000440 73 65 72 6e 61 6d 65 5f 76 61 6c 75 65 2c 20 70 |sername_value, p| 00000450 61 73 73 77 6f 72 64 5f 65 6c 65 6d 65 6e 74 2c |assword_element,| 00000460 20 73 69 67 6e 6f 6e 5f 72 65 61 6c 6d 29 29 4e | signon_realm))N| 00000470 0a 06 17 25 17 01 6f 69 6e 64 65 78 73 74 61 74 |...%..oindexstat| 00000480 73 5f 6f 72 69 67 69 6e 73 74 61 74 73 0b 43 52 |s_originstats.CR| 00000490 45 41 54 45 20 49 4e 44 45 58 20 73 74 61 74 73 |EATE INDEX stats| 000004a0 5f 6f 72 69 67 69 6e 20 4f 4e 20 73 74 61 74 73 |_origin ON stats| 000004b0 28 6f 72 69 67 69 6e 5f 64 6f 6d 61 69 6e 29 81 |(origin_domain).| 000004c0 40 08 07 17 17 17 01 82 5f 74 61 62 6c 65 73 74 |@......._tablest| 000004d0 61 74 73 73 74 61 74 73 09 43 52 45 41 54 45 20 |atsstats.CREATE | 000004e0 54 41 42 4c 45 20 73 74 61 74 73 20 28 6f 72 69 |TABLE stats (ori| 000004f0 67 69 6e 5f 64 6f 6d 61 69 6e 20 56 41 52 43 48 |gin_domain VARCH| 00000500 41 52 20 4e 4f 54 20 4e 55 4c 4c 2c 20 75 73 65 |AR NOT NULL, use| 00000510 72 6e 61 6d 65 5f 76 61 6c 75 65 20 56 41 52 43 |rname_value VARC| 00000520 48 41 52 2c 20 64 69 73 6d 69 73 73 61 6c 5f 63 |HAR, dismissal_c| 00000530 6f 75 6e 74 20 49 4e 54 45 47 45 52 2c 20 75 70 |ount INTEGER, up| 00000540 64 61 74 65 5f 74 69 6d 65 20 49 4e 54 45 47 45 |date_time INTEGE| 00000550 52 20 4e 4f 54 20 4e 55 4c 4c 2c 20 55 4e 49 51 |R NOT NULL, UNIQ| 00000560 55 45 28 6f 72 69 67 69 6e 5f 64 6f 6d 61 69 6e |UE(origin_domain| 00000570 2c 20 75 73 65 72 6e 61 6d 65 5f 76 61 6c 75 65 |, username_value| 00000580 29 29 29 09 06 17 3d 17 01 00 69 6e 64 65 78 73 |)))...=...indexs| 00000590 71 6c 69 74 65 5f 61 75 74 6f 69 6e 64 65 78 5f |qlite_autoindex_| 000005a0 73 74 61 74 73 5f 31 73 74 61 74 73 0a 81 13 07 |stats_1stats....| 000005b0 07 17 33 33 01 81 4d 74 61 62 6c 65 73 79 6e 63 |..33..Mtablesync| 000005c0 5f 6d 6f 64 65 6c 5f 6d 65 74 61 64 61 74 61 73 |_model_metadatas| 000005d0 79 6e 63 5f 6d 6f 64 65 6c 5f 6d 65 74 61 64 61 |ync_model_metada| 000005e0 74 61 08 43 52 45 41 54 45 20 54 41 42 4c 45 20 |ta.CREATE TABLE | 000005f0 73 79 6e 63 5f 6d 6f 64 65 6c 5f 6d 65 74 61 64 |sync_model_metad| 00000600 61 74 61 20 28 69 64 20 49 4e 54 45 47 45 52 2c |ata (id INTEGER,| 00000610 20 6d 6f 64 65 6c 5f 6d 65 74 61 64 61 74 61 20 | model_metadata | 00000620 56 41 52 43 48 41 52 20 4e 4f 54 20 4e 55 4c 4c |VARCHAR NOT NULL| 00000630 2c 20 50 52 49 4d 41 52 59 20 4b 45 59 20 28 69 |, PRIMARY KEY (i| 00000640 64 29 29 81 28 06 07 17 39 39 01 81 6b 74 61 62 |d)).(...99..ktab| 00000650 6c 65 73 79 6e 63 5f 65 6e 74 69 74 69 65 73 5f |lesync_entities_| 00000660 6d 65 74 61 64 61 74 61 73 79 6e 63 5f 65 6e 74 |metadatasync_ent| 00000670 69 74 69 65 73 5f 6d 65 74 61 64 61 74 61 07 43 |ities_metadata.C| 00000680 52 45 41 54 45 20 54 41 42 4c 45 20 73 79 6e 63 |REATE TABLE sync| 00000690 5f 65 6e 74 69 74 69 65 73 5f 6d 65 74 61 64 61 |_entities_metada| 000006a0 74 61 20 28 73 74 6f 72 61 67 65 5f 6b 65 79 20 |ta (storage_key | 000006b0 49 4e 54 45 47 45 52 2c 20 6d 65 74 61 64 61 74 |INTEGER, metadat| 000006c0 61 20 56 41 52 43 48 41 52 20 4e 4f 54 20 4e 55 |a VARCHAR NOT NU| 000006d0 4c 4c 2c 20 50 52 49 4d 41 52 59 20 4b 45 59 20 |LL, PRIMARY KEY | 000006e0 28 73 74 6f 72 61 67 65 5f 6b 65 79 29 29 52 05 |(storage_key))R.| 000006f0 06 17 27 19 01 73 69 6e 64 65 78 6c 6f 67 69 6e |..'..sindexlogin| 00000700 73 5f 73 69 67 6e 6f 6e 6c 6f 67 69 6e 73 06 43 |s_signonlogins.C| 00000710 52 45 41 54 45 20 49 4e 44 45 58 20 6c 6f 67 69 |REATE INDEX logi| 00000720 6e 73 5f 73 69 67 6e 6f 6e 20 4f 4e 20 6c 6f 67 |ns_signon ON log| 00000730 69 6e 73 20 28 73 69 67 6e 6f 6e 5f 72 65 61 6c |ins (signon_real| 00000740 6d 29 2b 04 06 17 3f 19 01 00 69 6e 64 65 78 73 |m)+...?...indexs| 00000750 71 6c 69 74 65 5f 61 75 74 6f 69 6e 64 65 78 5f |qlite_autoindex_| 00000760 6c 6f 67 69 6e 73 5f 31 6c 6f 67 69 6e 73 05 66 |logins_1logins.f| 00000770 01 07 17 15 15 01 81 2f 74 61 62 6c 65 6d 65 74 |......./tablemet| 00000780 61 6d 65 74 61 02 43 52 45 41 54 45 20 54 41 42 |ameta.CREATE TAB| 00000790 4c 45 20 6d 65 74 61 28 6b 65 79 20 4c 4f 4e 47 |LE meta(key LONG| 000007a0 56 41 52 43 48 41 52 20 4e 4f 54 20 4e 55 4c 4c |VARCHAR NOT NULL| 000007b0 20 55 4e 49 51 55 45 20 50 52 49 4d 41 52 59 20 | UNIQUE PRIMARY | 000007c0 4b 45 59 2c 20 76 61 6c 75 65 20 4c 4f 4e 47 56 |KEY, value LONGV| 000007d0 41 52 43 48 41 52 29 27 02 06 17 3b 15 01 00 69 |ARCHAR)'...;...i| 000007e0 6e 64 65 78 73 71 6c 69 74 65 5f 61 75 74 6f 69 |ndexsqlite_autoi| 000007f0 6e 64 65 78 5f 6d 65 74 61 5f 31 6d 65 74 61 03 |ndex_meta_1meta.| 00000800 0d 00 00 00 03 07 c2 00 07 ee 07 c2 07 e0 00 00 |................| 00000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000fc0 00 00 1c 0e 03 3b 11 6c 61 73 74 5f 63 6f 6d 70 |.....;.last_comp| 00000fd0 61 74 69 62 6c 65 5f 76 65 72 73 69 6f 6e 31 39 |atible_version19| 00000fe0 0c 0f 03 1b 11 76 65 72 73 69 6f 6e 32 35 10 01 |.....version25..| 00000ff0 03 23 11 6d 6d 61 70 5f 73 74 61 74 75 73 2d 31 |.#.mmap_status-1| 00001000 0a 00 00 00 03 07 c9 00 07 c9 07 f1 07 e5 00 00 |................| 00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000017c0 00 00 00 00 00 00 00 00 00 1b 03 3b 01 6c 61 73 |...........;.las| 000017d0 74 5f 63 6f 6d 70 61 74 69 62 6c 65 5f 76 65 72 |t_compatible_ver| 000017e0 73 69 6f 6e 0e 0b 03 1b 01 76 65 72 73 69 6f 6e |sion.....version| 000017f0 0f 0e 03 23 09 6d 6d 61 70 5f 73 74 61 74 75 73 |...#.mmap_status| 00001800 0d 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00001810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00002000 0a 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00002010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00002800 0a 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00002810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00003000 0d 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00003010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00003800 0d 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00003810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00004000 0d 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00004800 0a 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00004810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00005000 0a 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 |................| 00005010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00005800 pi@rpi3bplus-1:~$
--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

What's with the whitespace in filenames? It seems a pointless complication.

Anyway, that makes sense, at least more than putting user-specific date in places other than home directories.

Thanks for writing!

bob prohaska

Reply to
bob prohaska

On Sun, 6 Dec 2020 19:35:18 -0000 (UTC), bob prohaska declaimed the following:

You'd have to ask Google... Though before graphical file managers embedded spaces were rarely found, since they have to be escaped on the command line. Graphical systems that use text boxes can take almost anything and once you have that "anything" the OS functions for creating/opening files don't care. The normal escape for Linux appears to be a \ before the space. Windows, instead requires the entire path to be inside " marks if any component has a space.

Tab-completion on the command line does help. One just types enough of the path to identify the start of the file name, then hits and the OS fills in the name with any escapes (or shows a list of names with similar starts -- so those could require including the escape to isolate).

FYI: The Xerox CP/V OS allowed for other non-printable characters in file names -- like BEL, which would cause the terminal to beep when the name is displayed. Trick was, on anything faster than a 300baud terminal, one could not tell /where/ the BEL was while the name was spewed to the screen. One could have two files that "looked" like the same name on screen with non-printing characters at various locations...

example example

I haven't used Chromium on Windows but seem to have a

C:\Users\Wulfraed\AppData\Local\Chromium\User Data

directory, so that would be in the Windows equivalent of "home directory"

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

But it doesn't do any good, either.

I mount a tmpfs on ~/.cache It gets over the unnecessary, massive, data transfers when backing up.

--
Chris Elvidge 
England
Reply to
Chris Elvidge

In most unix shells you can use \ to escape a single character or use single or double quotes (in double quotes variable expansion happens in single quotes it doesn't) or if those seem too much typing then ? matches any single character including space. These conventions predate Linux by quite some time.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

This idea originally came from you!

In fact, it seems that the boot partition is mounted on /boot as part of the boot process, so on thinking about it, the only effect of it having content *should* be that the files in it occupy space in the filesystem partition but are inacessable while Raspbian is running. Consequently they would be better removed so that other, more useful files can occupy that space.

Note that, if the entire filesystem is backed up using tar, rsync or zip pointed at '/' while Raspbian is running from that SD card, then the backed up archive *will* correctly show that /boot contains the entire content of the boot partition. IOW, cleaning out /boot after restoring an offline SD card from the archive will at worst do no harm and at best will release some tens of MB of filespace.

I've always assumed that is why you said that /boot should be emptied when moving the two partitions to a bigger card. Doing so makes sense, is fast and easy to do, so why not do it?

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

I'm confused. I was talking about the .cache directory. What's the rest of this about? What has the boot partition have to do with .cache?

I use rsync -ax which doesn't copy any files not IN the / partition.

--
Chris Elvidge 
England
Reply to
Chris Elvidge

You shouldn't be backing up files under /boot, the boot partition needs to be backed up separately.

Most backup software will not cross filing system boundaries, so you don't backup several TB of mounted NAS drives rather than just your SD card. If rolling your own backups, make sure you specify option not to follow mounts or links to other filing systems.

If you've backed up with the correct options /boot on the root filing system will be empty, along with all the other places that should not be backed up (/dev /proc /media /mnt /tmp /run ecetera)

--druck

Reply to
druck

Quite agree!

However, a simplistic backup run on an RPi that writes '/*' to a .tgz archive or uses rsync to make a full filesystem backup to a different SD card or USB disk will do exactly that.

Its very easily done and, at first glance, looks like a neat trick.

A somewhat more knowledgeable person may make a TGZ archive of '/' plus a zip backup of the boot partition. This also looks like a neat trick, but also hides a similar problem.

All I'm trying to do is to explain the pitfalls in both backups and how to fix them should these be the perp's only backups.

Bottom line: if you want to copy a working RPi system to a new SD card, specially if you want a bigger filing system, don't mess with archivers, go straight for the jugular and use Clonezilla.

Indeed, but this us a special case: the RPi boot process mounts the boot partition on /boot and any backup of '/' made on a running RPi with rsync

*will* include the contents of the boot partition unless you've configured the rsync run to exclude /boot/* . Don't ask me how I know!

If this is something you do all the time you'll know it already: a friend is like this he's constantly setting up RPis for people who like music and has the parameters engraved on his brain. I, like most of us only do this stuff as long intervals and so, for us, that's why I'm saying that using CloneZilla is pretty much a one stop shop if you only have to transfer an RPi filesystem to an new SD card every few years.

NOTE: I didn't run out of space on mt EXT file system: I was only kicked into making the SD card switch because RPiHQ decided it would be a good idea to put copies of all bootable kernels in everybody's boot partition, which had the unintended consequence of overflowing my boot partition when the update tried to install an new, bigger kernel set.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Which is why all rsync based archive scripts should use the -x flag to rsync which prevents crossing filesystem boundaries, it's not just /boot you need to skip but *all* mounted filesystems.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

flag

Fair comment.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.