how to start pgsync work in the background?
Barolina opened this issue · 2 comments
Barolina commented
Please,
do I need to write the -d command to systemd? right?
kirubakaran commented
@Barolina Not sure if this is what you're looking for, but fwiw, here is my setup:
sudo vim /etc/systemd/system/pgsync.service
[Unit]
Description=pgsync daemon
After=network.target
[Service]
WorkingDirectory=/home/xxxx/pgsync
ExecStart=/home/xxxx/pgsync/env/bin/pgsync --daemon
User=xxxx
Restart=always
RestartSec=10
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable pgsync
sudo systemctl start pgsync
sudo systemctl status pgsync
You can follow the output of pgsync with:
sudo journalctl -u pgsync -f
Barolina commented
Thank you