Moving SleepyHeads Data Folder

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Moving SleepyHeads Data Folder

Post by jedimark » Tue Sep 17, 2013 6:52 pm

SleepyHead's data is rather big... Lots of indexes to make things load quicker, and make graphs work quicker. It was a design choice to speed things up.

People who have small solid state hard drives often ask me how to put SleepyHead's behemoth data folder somewhere else, and I completely forgot the current version of SleepyHead (0.9.3) does have the ability to select a data folder location during first run. I forgot I added it. I blame OSA.

If you upgraded you wouldn't have seen it, because that bit was skipped.

So here is how to move your SleepyHeadData after install... (in theory anyway. This idea needs testing)
  • Open a file browser like My Computer/Windows Explorer/Finder
    Locate your documents folder
    Rename "SleepyHeadData" folder to something else and remember it.
    Start SleepyHead, it will pretend it's a new installation.
    The first page lets you pick the location of SleepyHead data.. click the "..." and choose where you want the data to go.
    go through the motions of setting up a profile... just enter rubbish or skip fields if you like
    Once sleepyhead starts up, just close it (The current build may even crash on empty data!, but don't worry)
    Find your "new" sleepyhead data folder at the location you want it installed, and remove it.
    Copy your renamed original folder from step 1 into the location where you chose, making sure to rename it to match the folder name you chose in SleepyHead's location selector
    Start sleepyhead.
All things going to plan your SleepyHead data folder should be somewhere with more disk space.

If you attempt this, please let me know here how you go with it.

Cheers,

Mark

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code


User avatar
avi123
Posts: 4509
Joined: Tue Dec 21, 2010 5:39 pm
Location: NC

Re: Moving SleepyHeads Data Folder

Post by avi123 » Tue Sep 17, 2013 7:44 pm

What is "small solid state hard drives"? I know about solid state microprocessor that were co-invented by Robert Noyce, and I co-designed the probing machines (chips testers) to test them, but I don't know the "hard drive" relation.


Robert Noyce:

Image

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments:  S9 Autoset machine; Ruby chinstrap under the mask straps; ResScan 5.6
see my recent set-up and Statistics:
http://i.imgur.com/TewT8G9.png
see my recent ResScan treatment results:
http://i.imgur.com/3oia0EY.png
http://i.imgur.com/QEjvlVY.png

User avatar
bosstow
Posts: 67
Joined: Fri May 04, 2012 6:17 pm

Re: Moving SleepyHeads Data Folder

Post by bosstow » Tue Sep 17, 2013 7:58 pm

avi123 wrote:What is "small solid state hard drives"? I know about solid state microprocessor that were co-invented by Robert Noyce, and I co-designed the probing machines (chips testers) to test them, but I don't know the "hard drive"
link

_________________
Mask: TAP PAP Nasal Pillow CPAP Mask with Improved Stability Mouthpiece
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Max IPAP 25, Min EPAP 10, PS 5, ramp off. Climateline MAX tubing, CMS-50F Pulse Oximeter, ResScan & SleepyHead
Also have a Resmed S9 Autoset as a backup/travel machine

User avatar
avi123
Posts: 4509
Joined: Tue Dec 21, 2010 5:39 pm
Location: NC

Re: Moving SleepyHeads Data Folder

Post by avi123 » Tue Sep 17, 2013 8:22 pm

bosstow wrote:
avi123 wrote:What is "small solid state hard drives"? I know about solid state microprocessor that were co-invented by Robert Noyce, and I co-designed the probing machines (chips testers) to test them, but I don't know the "hard drive"
link
Thanks, I was not sure.

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments:  S9 Autoset machine; Ruby chinstrap under the mask straps; ResScan 5.6
see my recent set-up and Statistics:
http://i.imgur.com/TewT8G9.png
see my recent ResScan treatment results:
http://i.imgur.com/3oia0EY.png
http://i.imgur.com/QEjvlVY.png

User avatar
idamtnboy
Posts: 2186
Joined: Mon Nov 01, 2010 2:12 pm
Location: Idaho

Re: Moving SleepyHeads Data Folder

Post by idamtnboy » Tue Sep 17, 2013 10:59 pm

bosstow wrote:
avi123 wrote:What is "small solid state hard drives"? I know about solid state microprocessor that were co-invented by Robert Noyce, and I co-designed the probing machines (chips testers) to test them, but I don't know the "hard drive"
link
Updated version of RTFM, isn't it?

_________________
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Hose management - rubber band tied to casement window crank handle! Hey, it works! S/W is 3.13, not 3.7

Iowamv
Posts: 153
Joined: Thu Aug 29, 2013 8:06 am

Re: Moving SleepyHeads Data Folder

Post by Iowamv » Wed Sep 18, 2013 7:32 am

This worked for me, and even works storing the data in DropBox. I put it there so I could access the data from different machines. Is that something you'd eventually see problems with Mark? I figured that as long as I didn't leave the program running and accidentally try to access the data from two different machines simultaneously I'd probably be ok with that system.

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: Moving SleepyHeads Data Folder

Post by jedimark » Wed Sep 18, 2013 5:48 pm

Iowamv wrote:This worked for me, and even works storing the data in DropBox. I put it there so I could access the data from different machines. Is that something you'd eventually see problems with Mark? I figured that as long as I didn't leave the program running and accidentally try to access the data from two different machines simultaneously I'd probably be ok with that system.
Cool idea, just remember the data stored by sleepyhead is huge (My ~870 days is 520Mb, or 326Mb with compression, ResMed users data will be bigger again), but if you've got the bandwidth and the storage space.. nothing stops you from doing it.. In fact, making use of cloud storage is something I need to consider as important for SleepyHead 2.0, I use other apps that are just fantastic having the ability to access it from wherever I want.

While SleepyHead isn't designed for simultaneous multi-user, it's perfectly safe, as you guessed, to switch between different computers each time you use SleepyHead.

It's even safe to use two copies at the same time reading the same data folder, with a couple of caveats...

Until some kind of locking system is implemented, problems will crop up whenever one of the running copies writes something.. This happens when SleepyHead preferences are changed, when your SD card is imported, when anything needs to be recalculated, and after a day is changed whenever you edit a Journal entry/bookmark/weight/zombie/etc... The other running copy has no idea data has changed.

If another version tries to read a session or file while it's being written, SleepyHead will likely crash.
If you change preferences on one, the preferences will be written over by the other copy when it's closed down.

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

Iowamv
Posts: 153
Joined: Thu Aug 29, 2013 8:06 am

Re: Moving SleepyHeads Data Folder

Post by Iowamv » Wed Sep 18, 2013 7:35 pm

Right, all of that makes sense. Thanks. So the most conservative and foolproof way of using cloud storage is to make sure to exit the program after every use. So long as we don't leave it running, we're good to go.

What an awesome piece of software. I know you don't need a newbie like me to say this, but you've obviously done a lot of good for a lot of people. Thank you.