Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: malloc69 on February 16, 2011, 04:31:14 AM
-
I've a tinycore 3.4.1 running with extensions en PPR mode. I'm using postgres and the database can grow quite large, so I do not care to keep the database in the file mydata.tgz (take much to shut down the system). It is also essential to turn off the computer, unplugging it directly from the outlet (better not ask).
What way could load the system and the extensions in RAM (PPR) and leave only the files of the database on disk (PPI).
with this what I try is to prevent the system is corrupted when i turn it off, keeping the database as safe as possible.
thanks
-
I've never used postgres, but doesn't it give you the option to choose where to store the database? If so, you can specify somewhere on permanent storage.
If postgres does not allow you to choose where to store the database, you could use a symlink to direct it to somewhere on permanent storage and just enter the symlink in filetool.lst
-
from postgres --help
-D DATADIR database directoryso example usage
postgres -D /mnt/hda1/db_data
-
thank you both. your answers are helpful to me.
-
I take this post, to indicate how PostgreSQL should be started at boot the system (and maybe save someone some time).
Add the following line in the file '/opt/bootlocal.sh':
su tc -c 'postgres -D path_to_data_dir &'
-
start-stop-daemon --verbose --oknodo --background --chuid "tc:staff" --start --exec "/usr/local/bin/postgres" -- "-D /path/to/datadir"
i will add an init.d script next update