1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
|
.\" Text automatically generated by txt2man
.TH profile-sync-daemon 1 "10 February 2026" "" ""
.SH NAME
\fBProfile-sync-daemon \fP- Symlinks and syncs browser profiles to RAM (tmpfs) thus reducing HDD/SSD calls and speeding up browsers.
\fB
.SH DESCRIPTION
Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage browser profile/profiles in tmpfs and to periodically sync back to the physical disk (HDD/SSD). This is accomplished by an innovative use of rsync to maintain synchronization between a tmpfs copy and media-bound backup of the browser profile/profiles. Additionally, psd features several crash-recovery features.
.PP
Design goals of psd:
.RS
.IP \(bu 3
Completely transparent user experience.
.IP \(bu 3
Speed.
.RE
.PP
Since the profile/profiles, browser cache*, etc. are relocated into tmpfs (RAM disk), the corresponding I/O associated with using the browser is also redirected from the physical disk to the RAM, thus improving browser responsiveness during read/writes to profiles.
.PP
*Note that some browsers such as Chrome/Chromium, Firefox, Midori, and Rekonq actually keep their cache directories separate from their browser profile directory. It is not within the scope of Profile-sync-daemon to modify this behavior; users wishing to relocate this directory, may refer to the following url for several work-arounds: https://wiki.archlinux.org/index.php/Chromium_Tips_and_Tweaks#Cache_in_tmpfs
.SH SETUP
$XDG_CONFIG_HOME/psd/psd.conf (referred to hereafter as "the config file") contains all user managed settings.
.PP
NOTE: edits made to the config file while psd is active will be applied only after the service has been restarted.
.RS
.IP \(bu 3
With the release of v7.00 of psd overlayfs mode is the only supported option. It improve sync speed and offers a smaller memory footprint.
.IP \(bu 3
Optionally have psd resync to the filesystem prior to a sleep call. This can help in the event that the system does not properly wake up. Do this in the USE_SUSPSYNC variable.
.IP \(bu 3
Optionally define which browsers are to be managed in the BROWSERS array. If none are defined, the default is all detected browsers.
.IP \(bu 3
Optionally disable the use of crash-recovery snapshots (not recommended). Do this in the USE_BACKUPS variable.
.IP \(bu 3
Optionally define the number of crash-recovery snapshots to keep. Do this in the BACKUP_LIMIT variable.
.RE
.PP
NOTE: occasionally, updates/changes are made to the default config file (/usr/share/psd/psd.conf) upstream. The user copy ($XDG_CONFIG_HOME/psd/psd.conf) will need to be diffed against it.
.SH RUNNING PSD
.SS PREVIEW MODE
The preview option can be called to show users exactly what psd will do/is doing based on the entries in the config file. It will also provide useful information such as profile size, paths, and if any recovery snapshots have been created.
.PP
% Profile-sync-daemon v7.00
.PP
.nf
.fam C
systemd service: active
resync-timer: active
sync on sleep: disabled
Psd will manage the following per /home/facade/.config/psd/.psd.conf:
browser/psname: chromium/chromium
owner/group id: facade/100
sync target: /home/facade/.config/chromium
tmpfs dir: /run/user/1000/psd/facade-chromium
profile size: 110M
overlayfs size: 64M
recovery dirs: none
browser/psname: firefox/firefox
owner/group id: facade/100
sync target: /home/facade/.config/mozilla/firefox/z0pauair.default
tmpfs dir: /run/user/1000/psd/facade-firefox-z0pauair.default
profile size: 4.0K
overlayfs size: 0
recovery dirs: none
browser/psname: firefox/firefox
owner/group id: facade/100
sync target: /home/facade/.config/mozilla/firefox/kgtk05jp.default-release
tmpfs dir: /run/user/1000/psd/facade-firefox-kgtk05jp.default-release
profile size: 20M
overlayfs size: 19M
recovery dirs: none
.fam T
.fi
.SS START AND STOP PSD
Psd ships with a systemd user service to start or stop it (psd.service). Additionally, a provided resync-timer will run an hourly resync from tmpfs back to the disk. The resync-timer is started automatically with psd.service so there is no need to start the timer; only start psd.service.
.PP
.nf
.fam C
% systemctl --user [option] psd.service
.fam T
.fi
Available options:
start
stop
enable
disable
.SS CLEAN MODE
The clean mode will delete ALL recovery snapshots that have accumulated. Only run it when sure these are no longer needed.
.PP
.nf
.fam C
% psd c
Profile-sync-daemon v7.00
Deleting 2 crashrecovery dirs for profile /home/facade/.config/chromium
/home/facade/.config/chromium-backup-crashrecovery-20260209_171359
/home/facade/.config/chromium-backup-crashrecovery-20260209_112204
.fam T
.fi
.SH SUPPORTED BROWSERS
.IP \(bu 3
Chromium (stable, beta, and dev)
.IP \(bu 3
Conkeror
.IP \(bu 3
Epiphany
.IP \(bu 3
Falkon
.IP \(bu 3
Firefox (version 147 and above use freedesktop.org XDG base dir specs others use legacy ~/.mozilla)
.IP \(bu 3
Firefox-trunk (this is an Ubuntu-only browser: http://www.webupd8.org/2011/05/install-firefox-nightly-from-ubuntu-ppa.html)
.IP \(bu 3
Google Chrome (stable, beta, and dev)
.IP \(bu 3
Heftig's version of Aurora (Arch Linux: https://bbs.archlinux.org/viewtopic.php?id=117157)
.IP \(bu 3
Icecat
.IP \(bu 3
Iceweasel
.IP \(bu 3
Inox (https://bbs.archlinux.org/viewtopic.php?id=198763)
.IP \(bu 3
Luakit
.IP \(bu 3
Midori
.IP \(bu 3
Opera (legacy, stable, next, and developer)
.IP \(bu 3
Otter-browser
.IP \(bu 3
Palemoon
.IP \(bu 3
QupZilla
.IP \(bu 3
Qutebrowser
.IP \(bu 3
Rekonq
.IP \(bu 3
Seamonkey
.IP \(bu 3
Vivaldi
.IP \(bu 3
Vivaldi-snapshot
.RE
.PP
Psd's infrastructure can work in principal with any browser that uses a generic chrome or mozilla, etc. format. User supplied profiles are provided in /usr/share/psd/contrib/ and can be manually copied to /usr/share/psd/browsers/ if one wishes to sync that particular browser. Make a corresponding entry in the BROWSERS array within the config file. Support for these is unsupported.
.SH NOTE ON SYMLINKED PROFILES
Currently, psd does not support symlinked profiles and will refuse to sync if one is detected. For example, your firefox profile is ~/.mozilla/firefox/f8cv8bfu.default but you have moved that directory to /foo/bar/f8cv8bfu.default and replaced it with symlink:
.PP
.nf
.fam C
% ls -l ~/.mozilla/firefox
lrwxrwxrwx 1 facade users 26 Oct 1 17:02 f8cv8bfu.default -> /foo/bar/f8cv8bfu.default
.fam T
.fi
Running psd in preview mode will end in an error informing you of this:
.PP
.nf
.fam C
% psd p
Warning!
/home/facade/.mozilla/firefox/f8cv8bfu.default appears to be a symlink but these are not supported.
Please make the browser profile a live directory and try again. Exiting.
.fam T
.fi
A proper work around for firefox is to simply edit ~/.mozilla/firefox/profiles.ini defining the canonical path there. One also needs to adjust the IsRelative flag like so:
.PP
.nf
.fam C
[Profile0]
Name=default
IsRelative=0
Path=/foo/bar/f8cv8bfu.default
.fam T
.fi
Other solutions may exist for other browsers but documenting them all here is out of scope.
.SH SUPPORTED DISTROS
Since psd is just a bash script with a systemd service, it should run on any flavor of Linux running systemd. Several distros provide an official package or user-maintained option to install psd. One can also build psd from source. See the official website for available packages, dependencies, and installation instructions
.SH FAQ
Q1: Why do I have another browser profile directory "foo-back-ovfs" when I enable overlayfs?
.PP
A1: The way overlayfs works is to mount a read-only base copy (so-called lower dir) of the profile, and manage the new data on top of that. In order to avoid resyncing to the read-only filesystem, a copy is used instead. So using overlayfs is a trade-off: faster initial sync times and less memory usage vs. disk space in the home dir.
.PP
Q2: I need more memory to accommodate my profile/profiles in /run/user/xxxx. How can I allocate more?
.PP
A2: The standard way of controlling the size of /run/user/ is the RuntimeDirectorySize directive in logind.conf (see the man page for logind.conf for more). By default, 10% of physical memory is used but one can increase it safely. Remember that tmpfs only consumes what is actually used; the number specified here is just a maximum allowed.
.PP
Q3: My system crashed for some reason and psd didn't sync back. What do I do?
.PP
A3: The "last good" backup of the browser profile/profiles should be the filesystem. Upon restarting psd (on a reboot for example), a check is performed to see if the symlink to the tmpfs copy of the profile is invalid. If it is invalid, psd will snapshot the "last good" backup before it rotates it back into place. This is more for a sanity check that psd did no harm and that any data loss was a function of something else.
.PP
Q4: Where can I find this snapshot?
.PP
A4: It depends on the browser. The snapshot will be located in the same directory as the browser profile and it will contain a date-time-stamp that corresponds to the time at which the recovery took place. For example, a chromium snapshot will be ~/.config/chromium-backup-crashrecovery-20130912_153310 -- of course, the date_time suffix will be different.
.PP
Q5: How can I restore the snapshot?
.PP
A5: Follow these steps:
.RS
.IP 1. 4
Stop psd.
.IP 2. 4
Move the "bad" copy of the profile to a backup (don't blindly delete anything).
.IP 3. 4
Copy the snapshot directory to the name that browser expects.
.PP
Example using chromium:
.IP 1. 4
systemctl \fB--user\fP stop psd.service
.IP 2. 4
mv ~/.config/chromium ~/.config/chromium-bad
.IP 3. 4
cp \fB-a\fP ~/.config/chromium-backup-crashrecovery-20130912_153310 ~/.config/chromium
.RE
.PP
At this point, launch chromium which will use the backup snapshot just copied into place. If all is well, it is safe to delete ~/.config/chromium-bad and the snapshot. Remember, to start psd, no browsers must be open (or psd will refuse to start).
.PP
Q6: Can psd delete the snapshots automatically?
.PP
A6: Yes, run psd with the "clean" switch to delete snapshots.
.SH CONTRIBUTE
Users wishing to contribute to this project, should fork it and send a pull request. Source is freely available on github.
.SH BUGS
Discovered a bug? Please open an issue.
.RS
.IP \(bu 3
Several cases of data loss have been reported when using eCryptFS and psd, therefore until this issue is flushed out, users of eCryptFS are encouraged not to use psd unless willing to help troubleshoot suspected browser corruption. See: https://github.com/graysky2/profile-sync-daemon/issues/158
.SH ONLINE
.IP \(bu 3
Project page: https://github.com/graysky2/profile-sync-daemon
.IP \(bu 3
Wiki page: https://wiki.archlinux.org/index.php/Profile-sync-daemon
.SH AUTHOR
graysky (therealgraysky AT proton DOT me)
|