I have problems to automate by database backup by powershell. I want to export every day all records in a special table which are older (or better greater than >=) than a certain defined value for a Epoch Time.
My table looks like this structure:
mysql> show columns from generalhistory;
+-----------+--------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+-------------------+----------------+
| ID | int(11) | NO | PRI | NULL | auto_increment |
| DPName | varchar(100) | NO | | NULL | |
| Value | varchar(100) | NO | | NULL | |
| Timestamp | timestamp | NO | | CURRENT_TIMESTAMP | |
| Manager | varchar(100) | NO | | NULL | |
| EpochTime | bigint(20) | NO | | NULL | |
+-----------+--------------+------+-----+-------------------+----------------+
here are my command which i try to execute in a powershell windows but there will nothing be exported from the data.
PS D:\xampp\mysql\bin> .\mysqldump.exe --no-create-db --no-create-info --skip-triggers -u root -pmypassword homescada generalhistory --where="EpochTime > '1470268800975'"
I also tried this solution but also without success.
PS D:\xampp\mysql\bin> .\mysqldump.exe --no-create-db --no-create-info --skip-triggers -u root -pmypassword homescada generalhistory --where="'Timestamp' BETWEEN '2016-06-11 09:26:01' AND '2016-08-05 09:26:01'"
do you knwo what i do wrong?#
many thanks
dieter